Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
This repository was archived by the owner on Nov 9, 2017. It is now read-only.

Parsing of case class with Strings starting with "{" fails #75

@darkfrog26

Description

@darkfrog26

There is a valid scenario where a String may start with "{" when parsing a case class but I get the following exception because it decides that it must be an Object:

com.codahale.jerkson.ParsingException: Can not deserialize instance of java.lang.String out of START_OBJECT token

The defined type being String should tell the parser to ignore the type and simply put the data into the String.

Is there an annotation or something I can supply to my case class to tell Jerkson to just push the value in without trying to parse it?

Example:

case class Test(name: String)

parse[Test]("""{ "name": "{hello}" }""") <-- will throw an exception because it starts with "{"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions