mirror of
https://github.com/json-c/json-c.git
synced 2026-03-30 02:19:06 +08:00
In json_object_deep_copy(), copy over _userdata, at least for json_type_string's with the default serializer set, and provide a way for people using custom serializers to provide a custom shallow_copy method.
This commit is contained in:
@@ -32,7 +32,8 @@ Printing JSON objects for visual inspection
|
||||
}
|
||||
}
|
||||
}
|
||||
}------------------------------------------------
|
||||
}
|
||||
------------------------------------------------
|
||||
------------------------------------------------
|
||||
JSON2
|
||||
{
|
||||
@@ -112,7 +113,8 @@ Printing JSON objects for visual inspection
|
||||
}
|
||||
]
|
||||
}
|
||||
}------------------------------------------------
|
||||
}
|
||||
------------------------------------------------
|
||||
------------------------------------------------
|
||||
JSON3
|
||||
------------------------------------------------
|
||||
@@ -137,4 +139,10 @@ Printing JSON objects for visual inspection
|
||||
]
|
||||
}
|
||||
}
|
||||
}------------------------------------------------
|
||||
}
|
||||
------------------------------------------------
|
||||
|
||||
Testing deep_copy with a custom serializer set
|
||||
CALLED: my_shallow_copy on with_serializer object
|
||||
|
||||
deep_copy with custom serializer worked OK.
|
||||
|
||||
Reference in New Issue
Block a user