Skip to content

Feature Request - Add specifier for optionally parsing a field. #21

@ghost

Description

When parsing JSON, it is possible for a dictionary for example to be provided, or be NULL. It might be useful to have the option to detect NULL fields, and decide not to parse them if they are NULL. See example JSON below.

{"id":50919991711,"serialNumber":null,"owner":{"id":1344078314,"type":"User"},"created":"2019-12-03T02:49:36.457Z","updated":"2019-12-03T02:49:36.457Z"}

{"id":50920076429,"serialNumber":null,"owner":{"id":1344182127,"type":"User"},"created":"2019-12-03T02:52:36.14Z","updated":"2019-12-03T02:52:36.14Z"}

{"id":51542420781,"serialNumber":null,"owner":null,"created":"2019-12-14T17:20:50.357Z","updated":"2019-12-14T17:20:50.357Z"}

As shown, the first two have their owner fields filled in with information, but the other has it set to NULL. The behavior I am thinking of is similar to using the strstr function to detect if the key is NULL, but rather, built into the JSON parser as a feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions