Hello, World! I need to serialize a map of string ...
# serialization
b
Hello, World! I need to serialize a map of string to "anything" (could be an object, could be an int, a string, etc.). What's a way to declare the custom
Serializer
for this? (in particular, what
SerialDescriptor
can I use?) Thanks!
I guess there's a simpler way than custom serializers: simply use
Map<String, JsonElement>
for this.
n
that is also just
JsonObject
b
not sure I understand what you mean
oh I understand now 🙂 You mean
Map<String, JsonElement>
is the same as simply
JsonObject
since the keys of a json object are strings. Indeed! Good catch, thanks!
👍 1