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
In the following test, the quoted case fails. If I remove the special characters in the class name, it works.
It can be useful to support these escaped names. In my case, because I am generating classes programmatically from an external source.
The Quoted test produces this exception. Notice the spurious List here!
No constructor for type Entity, JObject(List((kind,JString(Procedure)), (node_type,JString(entity-.procedureT.-)), (substitution,JString(example algorithms)), (counter,JInt(0))))
org.json4s.MappingException: No constructor for type Entity, JObject(List((kind,JString(Procedure)), (node_type,JString(entity-.procedureT.-)), (substitution,JString(example algorithms)), (counter,JInt(0))))
at org.json4s.reflect.package$.fail(package.scala:56)
at org.json4s.Extraction$ClassInstanceBuilder.$anonfun$constructor$2(Extraction.scala:566)
at scala.Option.getOrElse(Option.scala:201)
at org.json4s.Extraction$ClassInstanceBuilder.constructor(Extraction.scala:566)
at org.json4s.Extraction$ClassInstanceBuilder.instantiate(Extraction.scala:673)
at org.json4s.Extraction$ClassInstanceBuilder.result(Extraction.scala:768)
at org.json4s.Extraction$.$anonfun$extract$10(Extraction.scala:463)
at org.json4s.Extraction$.$anonfun$customOrElse$1(Extraction.scala:781)
at scala.PartialFunction.applyOrElse(PartialFunction.scala:214)
at scala.PartialFunction.applyOrElse$(PartialFunction.scala:213)
at scala.PartialFunction$$anon$1.applyOrElse(PartialFunction.scala:367)
at org.json4s.Extraction$.customOrElse(Extraction.scala:781)
at org.json4s.Extraction$.extract(Extraction.scala:455)
at org.json4s.Extraction$.extract(Extraction.scala:56)
at org.json4s.ExtractableJsonAstNode$.extract$extension(ExtractableJsonAstNode.scala:22)
at org.json4s.native.Serialization$.read(Serialization.scala:80)
at org.json4s.Serialization.read(Serialization.scala:31)
at org.json4s.Serialization.read$(Serialization.scala:31)
at org.json4s.native.Serialization$.read(Serialization.scala:33)
The text was updated successfully, but these errors were encountered:
json4s version
4.1.0-M1
scala version
2.13.8
jdk version
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
In the following test, the quoted case fails. If I remove the special characters in the class name, it works.
It can be useful to support these escaped names. In my case, because I am generating classes programmatically from an external source.
The Quoted test produces this exception. Notice the spurious
List
here!The text was updated successfully, but these errors were encountered: