Added proper serialization of JsonObject objects.