1

I am using jsonpickle which creates JSON with "py/object" with parameter unpicklable=True. If I need unpicklable=False type simple JSON, is there any library which does this like in Java?

It is very weird to put long "py/object" names in JSON.as these names are specific to application

vipin
  • 152
  • 12

1 Answers1

-1

does this solve the problem? if you are trying to serialize arbitrary classes and have java understand without prior class def you'll have to use some form of reflection, and worst case run time compilation.

personally i would look for a more structured way to achieve this like a command based system where the loaded classes can run lists of predefined commands giving better separation

Rhys
  • 1
  • 1
  • 8
  • are you referring to Gson library for java ? my question is is there something like this in python I found jsonpickle which requires "py/object" in json structure so i was trying to find something clean like Gson – vipin Feb 05 '19 at 15:09
  • if you just want a json seriliser in python then `import json`, load(open_file) loads(string_json) – Rhys Feb 08 '19 at 12:24