Add azy_content_serialize_json() so you can serialize JSON date even when not doing RPC.
Add a check to avoid a segfault when deserializing an empty array.