Open GoogleCodeExporter opened 9 years ago
Thanks for report. Simpleubjson uses Draft-8 by default. This need to be fixed,
but Draft-9 is also implemented and you may use it now:
>>> simpleubjson.encode({'hello' : 'world'}, spec='draft-9')
Original comment by kxepal
on 13 Nov 2014 at 11:13
Sorry, Draft-10 is actual now, Draft-9 is implemented. Anyway, will fix this
soon.
Original comment by kxepal
on 13 Nov 2014 at 11:16
Explicit draft-9 spec definition does not seem to help:
import simpleubjson
>>> simpleubjson.encode({'hello' : 'world'}, spec='draft-9')
'{Si\x05helloSi\x05world}'
The extra 'S' marker still exists for name string 'hello'.
I'm implementing a C++ library against draft-9 specification. My goal is to
test the C++ library against simpleubjson.
Original comment by mihon...@gmail.com
on 19 Nov 2014 at 7:44
Yes, that's a bug. Much likely my implementation reference to the days when
Draft-9 didn't change strings. Thanks!
Original comment by kxepal
on 19 Nov 2014 at 9:27
[deleted comment]
[deleted comment]
After re-checking the draft versions and discussions it seems that the 'S'
marker from name strings has been removed only in draft-10. So this was
apparently my mistake. Since I'm developing draft-9 compatible parser it will
use the 'S' markers. Thanks!
Original comment by mihon...@gmail.com
on 3 Dec 2014 at 6:59
Is there any estimate when simpleubjson supporting the latest draft (draft-10)
currently published on ubjson.org will become available?
Original comment by mihon...@gmail.com
on 10 Dec 2014 at 6:06
I'll handle it over this weekends when I have enough time to make it in single
shot. Draft 10 contains significant changes for Array type which need to be
handled carefully and right. Stay tuned!
Original comment by kxepal
on 10 Dec 2014 at 6:20
Cool! I had to implement typed arrays to my C++ implementation. Originally I
thought to stick with draft-9 and use String-type for raw binary data, but the
requirement for UTF-8 encoding makes that impossible. Anyway, I will verify my
own implementation's compliance with draft-10 against simpleubjson.
Original comment by mihon...@gmail.com
on 10 Dec 2014 at 11:36
I know that feeling. Hopefully, with draft 10 you may use typed array of uint8
to handle any binary data with just 8±2 bytes overhead depending on it size.
Original comment by kxepal
on 10 Dec 2014 at 11:42
Original issue reported on code.google.com by
mihon...@gmail.com
on 13 Nov 2014 at 11:02