jsown icon indicating copy to clipboard operation
jsown copied to clipboard

`to-json*` prints empty string instead of `{}` for empty object

Open aerique opened this issue 7 years ago • 4 comments

to-json* prints an empty string instead of {} for an empty object:

* (jsown:to-json (jsown:empty-object))
"{}"
* (jsown:to-json* (jsown:empty-object))
""

This is on Void Linux with SBCL 1.3.17 and jsown-20160208-git.tgz from Quicklisp.

aerique avatar May 18 '17 09:05 aerique

Couldn't reproduce it.

CL-USER> (jsown:to-json (jsown:empty-object))
"{}"

Maybe it's already fixed?

mateusfccp avatar Jul 30 '19 15:07 mateusfccp

I think this must have been fixed along the road. I also don't see it. Thanks for cleaning this up @mateusfccp

madnificent avatar Aug 11 '19 12:08 madnificent

Still the case for me on master:

CL-USER> (jsown:to-json (jsown:empty-object))
"{}"
CL-USER> (jsown:to-json* (jsown:empty-object))
""
CL-USER> 

jonatack avatar Aug 14 '19 11:08 jonatack

Reopening, but not sure when we'll fix it without a PR.

I presumed the context where this is used to be known when the faster writing mechanism is requested. It's still unexpected behavior and I suppose others will hit that too.

madnificent avatar Aug 14 '19 18:08 madnificent