Skip to content

reverse JSON to object fails for AlchemyDataNews DocumentsResult object #214

@shikida

Description

@shikida

Hi
Because I am caching Alchemy results, I am saving objects as JSON and deserializing them using a function like

    Gson gson = new GsonBuilder().create();
    DocumentsResult fv = gson.fromJson(new FileReader("/home/leoks/git/newsmood.1/ibm.march.1.to.10.2016.json"), DocumentsResult.class);

The problem seem to be only for the boolean field "confident".

          "publicationDate": {
            "date": "20090115T000000",
            "confident": false
          },

If I replace it to a String like this

          "publicationDate": {
            "date": "20090115T000000",
            "confident": "false"
          },

I can get the DocumentsResult object from JSON, otherwise it just returns an error message.

I'd just like to check if I am doing something wrong or if this is a bug

TIA

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions