Skip to content
Browse files

Accept json for xml version

  • Loading branch information...
1 parent 7c6ae99 commit 053ebb6b9ebf9843fa7169799102490ddd675327 Mike McCabe committed Jul 9, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 JsonPatch.inc
View
3 JsonPatch.inc
@@ -489,6 +489,9 @@ class JsonPatch
// Compute a new document from the supplied $doc and $patches.
public static function patch_xml($doc, $patches)
{
+ $doc = self::json_to_array($doc);
+ $patches = self::json_to_array($patches);
+
// accept singleton patches
if (count($patches) != 0 && !isset($patches[0]))
{

0 comments on commit 053ebb6

Please sign in to comment.
Something went wrong with that request. Please try again.