# Json Libgdx serialize / de-serialize a Object Map of Object Maps

Any one have any ideas on how I can serialize / de-serialize an

ObjectMap<Enum, ObjectMap<String, Object>>();


(Object is usually a String Integer or Vector2 ) using libgdx's built in json classes?. On de-serialize the inner ObjectMap, is always null even though the values are written to the json file.

• Usually I convert my map to a list of key-value pairs, and serialize that. Have you tried anything similar? – DMGregory Mar 18 at 11:40
• yes But I really don't know how to properly do that – Macmanmatty Mar 18 at 13:41
• Then show us what you tried, and we can help you with what's next. – DMGregory Mar 18 at 13:56
• I thought libgx classes were automatically serializable via json. – Macmanmatty Mar 18 at 15:35
• had someone have told me libgdx json can't de-serialize Enums I would have solved. this days ago – Macmanmatty Mar 21 at 18:29

3. Write lots of special serialization / de-serialization code using a class that implements Json.Serializer<T> where T is your map and then register that with your libGDX Json instance.