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

Implement a JSTN generator and related APIs #6

Merged
merged 4 commits into from
Jun 16, 2018
Merged

Implement a JSTN generator and related APIs #6

merged 4 commits into from
Jun 16, 2018

Conversation

tylerchr
Copy link
Owner

@tylerchr tylerchr commented Jun 9, 2018

This PR introduces a JSTN generator that behaves as described in the specification. Additionally, it clarifies the wording of the specification with regard to the generated pretty format.

Since we now have a way to convert a Type to a serialized form, this PR also implements String(), json.Marshaler, and json.Unmarshaler on Type with the following behavior:

  • String() method format Type using the concise format.
  • MarshalJSON() produces a JSON string whose value is the JSTN text.
  • UnmarshalJSON() parses a JSTN text string (it returns an error if given a non-string JSON type).

@coveralls
Copy link

coveralls commented Jun 9, 2018

Pull Request Test Coverage Report for Build 12

  • 90 of 90 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+3.7%) to 81.323%

Totals Coverage Status
Change from base Build 8: 3.7%
Covered Lines: 418
Relevant Lines: 514

💛 - Coveralls

Copy link

@davejhilton davejhilton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

@tylerchr tylerchr merged commit 9b04954 into master Jun 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants