preserve field ordering in JsonAst and JsonPrinters

14 views
Skip to first unread message

Henry Liu

unread,
Feb 23, 2015, 4:01:54 PM2/23/15
to spray...@googlegroups.com
In early spray-json (1.2.5) JsObject keeps fields in ListMap, v1.3.0 has changed it to Map. 
This loses the field ordering for case classes. 

Would you be open to allow the fields type to be configurable so the user code can switch it to ListMap when needed?
(adding a JsObject construction function to DefaultJsonProtocol or something)

Since the ordering is not required per json specs, it is merely just for human reading convenience, I want to get your opinion on this.

Thanks!
Henry

Mathias Doenitz

unread,
Feb 23, 2015, 4:04:51 PM2/23/15
to spray...@googlegroups.com
Henry,

check out the discussion on this ticket:
https://github.com/spray/spray-json/issues/119

Cheers,
Mathias

---
mat...@spray.io
http://spray.io
> --
> You received this message because you are subscribed to the Google Groups "spray.io User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to spray-user+...@googlegroups.com.
> Visit this group at http://groups.google.com/group/spray-user.
> To view this discussion on the web visit https://groups.google.com/d/msgid/spray-user/76f69dc3-cd73-46c4-9ecd-3249b9e7012f%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Henry Liu

unread,
Feb 23, 2015, 4:17:50 PM2/23/15
to spray...@googlegroups.com
adding comments to that thread. 
thanks!
Reply all
Reply to author
Forward
0 new messages