Giter Site home page Giter Site logo

afborgesdev / convertjsontogherkinexampletable Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 168 KB

This is a tool that allows converting JSON as a table to the Gherkin Language

License: Apache License 2.0

C# 98.29% PowerShell 1.71%
gherkin gherkin-files csharp-library csharp bdd bdd-tests netcore

convertjsontogherkinexampletable's Introduction

cover

Alexandre Borges

image image

I solve problems, eventualy using a programming language.

Hi, I'm a software engineer, my focus is on delivering good solutions.
To do that I like to go deep into code quality and tests.

About:

  • Language : C#, GO
  • Hobbies : Coffee โ˜•, Vinil music, and art in general.
  • Pronouns: He / Him | Ele / Dele
  • Career Focus : Code Quality, Code Performance, Tests, and microservices.

Linkedin

convertjsontogherkinexampletable's People

Contributors

afborgesdev avatar dependabot[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar

convertjsontogherkinexampletable's Issues

Nested array is not flattening on the output

While trying to convert a json that contains nested array, they are not converted properly to a table.

Suggestion, make each element of the array with a increasing counter on the headers and fill the table with the properties from the JSON.
Ex:
Email1.Description
Email2.Description

Example of JSON:

{
   "Address": {
       "Customertype": null,
       "City": "ROUND ROCK",
       "AddressType": "Billing",
       "PostalCode": "78664",
       "CompletePostalCode": "78664",
       "Country": "US",
       "CustomerAccountType": "",
       "OrganizationName": "",
       "StateCode": "T",
       "LineTwo": "",
       "CountryCode": "US",
       "LineOne": "1 DELL WAY",
       "ProvinceName": "T",
       "State": "T"
   },
   "CompanyNumber": "",
   "Emails": [
       {
           "PrimaryFlag": false,
           "Address": "[email protected]"
       }
   ],
   "Class": "",
   "Contact": {
       "FirstName": "sample",
       "LastName": "sample",
       "ContactMain": "sample",
       "FamilyName": "",
       "Suffi": ""
   },
   "PartyName": "",
   "Phones": [
       {
           "RawPhoneNumber": "800_0000000",
           "AreaCode": "800",
           "PrimaryFlag": false,
           "PhoneTypeCode": "",
           "LocalNumber": "0000000",
           "CompleteNumber": "800_0000000",
           "ContactPointType": ""
       }
   ],
   "Number": "33955743",
   "PartyId": "",
   "AccountId": ""
}

Qual o ETA?

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

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.