Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON parse #1266

Closed
AndreasBrostrom opened this issue Dec 17, 2019 · 3 comments · Fixed by #1272
Closed

JSON parse #1266

AndreasBrostrom opened this issue Dec 17, 2019 · 3 comments · Fixed by #1272
Labels
Milestone

Comments

@AndreasBrostrom
Copy link
Contributor

Is your feature request related to a problem?
No

Solution you'd like:
I whould like the json parser functions from ALIVE to be integrated in to cba. Today a YAML parser exist but one for JSON format whould also be greate.
Function links below:

Alternatives you've considered:
Contact maintainers of ALIVE is for rewire and copy paste or rewrite the YAML one.

Additional context:
None

@commy2
Copy link
Contributor

commy2 commented Dec 18, 2019

Well, am I allowed to just copy these? They look pretty nice aside from small imperfections, mostly newlines and legacy private array usage. Can't say if they work as expected though, because idk anything about JSON.

@AndreasBrostrom
Copy link
Contributor Author

AndreasBrostrom commented Dec 18, 2019

JSON is basicly YAML with {}

{
     "firstName": "Jason",
     "lastName": "Smith",
     "age": 25,
     "address": {
         "streetAddress": "21 2nd Street",
         "city": "New York",
         "state": "NY",
         "postalCode": "10021"
     },
     "phoneNumber": [
         { "type": "home", "number": "212 555-1234" },
         { "type": "fax", "number": "646 555-4567" }
     ],
     "newSubscription": false,
     "companyName": null
 }

@bux
Copy link
Contributor

bux commented Dec 18, 2019

but indentation is not forced as in yaml.

{"firstname":"Jason","lastName":"Smith"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants