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

problem with serialisation character arrays longer than 399 characters. #65

Closed
aardwolf-ge opened this issue Jul 7, 2020 · 4 comments
Closed

Comments

@aardwolf-ge
Copy link

Hello,
I have found a strange issue:
this code recreates it:
t= ''
for k=1:400
t= [t 'x']
end
jt=savejson(t)

The character array is serialised as a double array.
Compare it to 399 in the loop where everything works fine.

@fangq fangq closed this as completed in 6a8ce93 Jul 7, 2020
@fangq
Copy link
Member

fangq commented Jul 7, 2020

hi @aardwolf-ge, this is now fixed.

if using jsonlab 2.0, a temporary workaround is to set compressstringsize to inf.

jt=savejson('t',t,'CompressStringSize',inf)

@aardwolf-ge
Copy link
Author

aardwolf-ge commented Jul 7, 2020 via email

@fangq
Copy link
Member

fangq commented Jul 7, 2020

can you clarify your reply a little bit more? when you said "it does not work for me", were your referring to the 'compressstringsize',inf command? or the patch I just committed? or the two additional options you mentioned?

@aardwolf-ge
Copy link
Author

aardwolf-ge commented Jul 7, 2020 via email

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