You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if(keyWithQuotes) encloseJsonString(key) else appendJsonString(key)
// a new val in printervalnoSpacesAndKeysWithoutQuotes=Printer(
preserveOrder =true,
dropNullKeys =false,
indent ="",
keyWithQuotes =false
)
please review current proposal and let me know the feedback , i can send a PR :)
The text was updated successfully, but these errors were encountered:
Thanks, @chandu0101, but I'm a little hesitant to add this to core, for a few reasons:
The result isn't valid JSON. In some cases circe can be configured to be more conservative than the JSON spec (e.g. it can maintain insertion order), but not less.
If we did decide to support this syntax on the printing side, I'd prefer to support parsing it, and that's likely to be a lot more complicated.
I know practically nothing about GraphQL, but at a glance it looks like it adds other syntax to JSON that isn't covered by this change (so you still can't use circe to produce arbitrary GraphQL).
Does this sound accurate? If there's demand for this, and if we can add parsing support (not necessarily using Jawn), I'd definitely consider including it in a new module.
first of all thanks for prompt and detailed response
The result isn't valid JSON
End of the story, i thought its a valid JSON :(
I know practically nothing about GraphQL, but at a glance it looks like it adds other syntax to JSON that isn't covered by this change
Yeah GraphQL is JSON like query lang but its API'S(js clients) accepts valid js.Object's, looks like i am calling API in wrong way even though it works!. I think i actually need Json to scala.js js.Object/js.Dynamic which we can cover in #93 !
Currently printer prints keys with string quotes
Use cases : Some API's(for example GraphQL) doesn't allow keys with quotes
Fix :
Looks like an easy one
https://github.com/travisbrown/circe/blob/master/core/shared/src/main/scala/io/circe/Printer.scala#L166
please review current proposal and let me know the feedback , i can send a PR :)
The text was updated successfully, but these errors were encountered: