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

Improve circe encoder #168

Open
aaabramov opened this issue Mar 18, 2019 · 2 comments
Open

Improve circe encoder #168

aaabramov opened this issue Mar 18, 2019 · 2 comments

Comments

@aaabramov
Copy link
Contributor

According to circe/circe#536 there is no need to make transitive string serialization to get UTF-8 bytes array.

@timcharper
Copy link
Member

Can you open a PR or put some more details about what you mean?

@aaabramov
Copy link
Contributor Author

Sure, sorry.

Currently, op-rabbit-circe serializes JSON to string, and then gets bytes from it (https://github.com/SpinGo/op-rabbit/blob/master/addons/circe/src/main/scala/com/spingo/op_rabbit/CirceSupport.scala#L18):

value.asJson.noSpaces.getBytes(utf8)

But circe is able to generate bytes array directly.

Examples can be found here: https://github.com/circe/circe-jackson/pull/11/files

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

2 participants