jsonista icon indicating copy to clipboard operation
jsonista copied to clipboard

Implement custom deserializer

Open rpofuk opened this issue 5 years ago • 1 comments

When we are using json there is lots of information is passed out of channel. This is in java covered by types.

Usualy in clojure this is not a problem. From my experience there are 2 types that caued issues. That where keyward and uuis. Because they are not objects they cannot be deserialized to map or vector like usuall java objects are. They in that way behave as if they where primitives.

Problem comes when there is nested data structure containing some of those. When we serialize such structure in Json we loos information about this 2 types.

To support such case, a function that can customize decoding process is proposed.

This function will not affect any existing path in code.

Function accepts java Object type and outputs Object type.

Sample implementeation provided in tests

rpofuk avatar Oct 09 '20 07:10 rpofuk

I was using InteliJ so I aded 2 add items to gitignore that are usually anoying. Hope is ok :)

rpofuk avatar Oct 09 '20 07:10 rpofuk