[spray-json] Duplicate fields in a JsObject

274 views
Skip to first unread message

Christian Lorenz

unread,
Feb 22, 2017, 10:00:08 AM2/22/17
to spray.io User List
Hi,

when trying to parse a json object with spray-json, multiple field names seems to be ok.
E.g.

val x = JsonParser("""{"obj":{"field":"value1","field":"value2"}}""")
println(x)
-> {"obj":{"field":"value2"}}

According to the Json specification this seems fine. 
Is there a way to force a parsing error in such a situation? 

Kind regards,
Christian
Reply all
Reply to author
Forward
0 new messages