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:
Eric Haszlakiewicz
2017-11-29 23:35:38 -05:00
parent 96efeadd6e
commit 5dae561d33
4 changed files with 236 additions and 90 deletions

View File

@@ -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.