Skip to content

Tool is not handling null values inside json files, raising null exception. Should be converted to empty on the tables #4

@fauosilva

Description

@fauosilva

Example of json file that would raise an exception:

{
"Address": {
"Customertype": null,
"City": "ROUND ROCK",
"AddressType": "Billing",
"PostalCode": "78664",
"CompletePostalCode": "78664",
"Country": "US",
"CustomerAccountType": "",
"OrganizationName": null,
"StateCode": "T",
"LineTwo": "",
"CountryCode": "US",
"LineOne": "1 DELL WAY",
"ProvinceName": "T",
"State": "T"
}
}


Beggining of call stack:

Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.NullReferenceException: Object reference not set to an instance of an object.
at System.Object.GetType()
at ConvertJsonToGherkinExampleTable.Core.TableConverter.Resolvers.HeaderResolver.Resolve(Dictionary`2 json) in /home/runner/work/ConvertJsonToGherkinExampleTable/ConvertJsonToGherkinExampleTable/src/ConvertJsonToGherkinExampleTable.Core/TableConverter/Resolvers/HeaderResolver.cs:line 12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions