w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How do I use a custom Json Serializer inside another serializer

Note how you have access to the JsonSerializationContext in your custom JsonSerializer classes. You can call JsonSerializationContext#serialize(Object) and Gson will use a registered or default TypeAdapter to serialize that object and return a JsonElement which you can add to the outer JsonElement.

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.