Hi, I am using spray-json v1.3.1. In this, I have a complex AST and I am trying to convert a json to this AST using spray json. I have defined RootJsonFormats for the objects in the AST. In case of a data type mismatch or some error in json, spray-json throws an error message like Expect JsBoolean which I dont want to expose outside. Is there a way to customize this message. Mine is a spray app. Also All our APIs return a json in case of error in a specific structure. I would also like to send DeserilizationExceptions as json. How to do this?
Hi, I am using spray-json v1.3.1. In this, I have a complex AST and I am trying to convert a json to this AST using spray json. I have defined
RootJsonFormat
s for the objects in the AST. In case of a data type mismatch or some error in json, spray-json throws an error message likeExpect JsBoolean
which I dont want to expose outside. Is there a way to customize this message. Mine is a spray app. Also All our APIs return a json in case of error in a specific structure. I would also like to sendDeserilizationException
s as json. How to do this?