Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serializing with a partially deserialized object #27

Open
bsless opened this issue Mar 10, 2020 · 0 comments
Open

Serializing with a partially deserialized object #27

bsless opened this issue Mar 10, 2020 · 0 comments

Comments

@bsless
Copy link
Contributor

bsless commented Mar 10, 2020

Hello,
Thank you for this great library. I really like it.

I have a particular use case which I wanted to know was possible with jsonista and if so, what I'd have to do:

When using write-value with a byte array as value in a map and reading it back with read-value, it's interpreted as a string and not as the object from which it was read, i.e.

(read-value
 (write-value-as-bytes
  {"b" (write-value-as-bytes {"a" 1})}))
=> {"b" "eyJhIjoxfQ=="}

while the desired output would be {"b" {"a" 1}}.

Do I need to do some hacking on the mapper to make it happen?
I tried writing a mapper which would pass a byte-array without change and provide it as a module when creating an object-mapper but it didn't work.
Do you have suggestions?

Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant