Skip to content

Prevent Null values to appear in .dump() #995

Description

@nuno407

Imagine that you have the following json string created by .dump()

{"connectorId":0, "meterValue": [{"sampledValue":[{"context":"Sample.Periodic","format":null,"location":"Body","measurand":null,"phase":"L1","unit":"V","value":"18440"},{"context":"Sample.Periodic","format":null,"location":"Body","measurand":null,"phase":"L2","unit":"V","value":"46927"},{"context":"Sample.Periodic","format":null,"location":"Body","measurand":null,"phase":"L3","unit":"V","value":"44515"}]

How can I configure the library to not include null values in the dump? I research in the documentation by with no success. The only way I can find is to create a For loop that removes all null entries but is quite inefficient.

Thank you for the help,
Nuno

Metadata

Metadata

Assignees

No one assigned

    Labels

    solution: proposed fixa fix for the issue has been proposed and waits for confirmation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions