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

Strange JSON output #6

Closed
eckart opened this issue Jan 4, 2010 · 2 comments
Closed

Strange JSON output #6

eckart opened this issue Jan 4, 2010 · 2 comments

Comments

@eckart
Copy link

eckart commented Jan 4, 2010

Hi,

while testing a Jersey JSON MessageBodyWriter I noticed a strange JSON serialization like this:
-------------------- mvn scala:console output --------------------
scala> import sjson.json.Serializer.SJSON
import sjson.json.Serializer.SJSON
import sjson.json.Serializer.SJSON

scala> new String(SJSON.out(List("a","b")))
new String(SJSON.out(List("a","b")))
res2: java.lang.String =
��w

["a", "b"]

scala>

I guess the ObjectOutputStream that is used since 28.12 is adding the additional characters...

@debasishg
Copy link
Owner

You guessed it right .. it's due to the ObjectOutputStream. Let me have a look at it .. The chaining of in and out works though ..
val l = List("a", "b")
serializer.in(serializer.out(l)) works ok ..

@debasishg
Copy link
Owner

Fixed and new API provided for serialization through an externally specified classloader.

This issue was closed.
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