Skip to content

JSON conversion for not available date fields is “0001-01-01T00:00:00Z" #196

@caryp

Description

@caryp

Metro2 Version: latest|0.9.0

What were you trying to do?
Convert a METRO2 file to JSON with zero-filled dates for some non-required date fields.

What did you expect to see?
From the CDIA's METRO2 2020 Credit Reporting Resource Guide, we see that the Header Record (Char format) Field 10 is Program Date, is not required, and is Recording Technique of "numeric".

From the "Programing standards" section in the same guide it mentions:
"If a numeric field is not available, it should be zero filled."

I would expect the converted JSON data for a zero-filled date field to be blank (e.g. "")

What did you see?
Zero-filled dates are being converted to JSON with a value of “0001-01-01T00:00:00Z" -- which is the IsZero() value.

How can we reproduce the problem?
Convert any non-required data field (like Base Record Field 10 "dateClosed") to all zeros and convert to JSON.

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