Skip to content

Handle nil values #22

Open
Open
@schorsch

Description

@schorsch

@VidurMalik added a change for nested objects, which are not present in the output json when nil:
#19

Still need to handle the other field types: plain properties & nested arrays.

A reasonable approach could be to add the following options:

  • ignore_null: true => which would leave out all nil values from the output json
  • strict: true => the parser throws an error when an schema property does not exists on the object e.g obj.respond_to?(field) Such could be needed to find out why a key is missing in the json: does it exists or is it nil?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions