Skip to content

Improve docs on JSON #15675

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

Merged
merged 1 commit into from
Jul 17, 2014
Merged

Improve docs on JSON #15675

merged 1 commit into from
Jul 17, 2014

Conversation

errordeveloper
Copy link

  • add one simple example of using ToJson trait
  • make example code more readable


This examples above uses the `ToJson` trait to generate the JSON string, required for custom mappings.

### Simle example of `ToJson` usage
Copy link
Member

Choose a reason for hiding this comment

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

"Simple"

@errordeveloper
Copy link
Author

Fix the line length issue that Travis complained about.

@errordeveloper
Copy link
Author

@steveklabnik @huonw r?

## Using `ToJson`
## Using the `ToJson` trait

The examples above uses the `ToJson` trait to generate the JSON string, required for custom
Copy link
Member

Choose a reason for hiding this comment

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

"The examples above use"

Copy link
Member

Choose a reason for hiding this comment

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

and also "string, which is required"

@steveklabnik
Copy link
Member

lgtm after those two tiny changes.

- add one simple example of using `ToJson` trait
- make example code more readable
@errordeveloper
Copy link
Author

@steveklabnik thanks for paying attention to my typos, I fixed them now :)

@errordeveloper
Copy link
Author

@alexcrichton I don't seem to see an error. There are some warning though, but all changes here are in comments... Any ideas?

@alexcrichton
Copy link
Member

It looks like a spurious failure, and @huonw write @bors: retry so that should give it another go.

bors added a commit that referenced this pull request Jul 17, 2014
- add one simple example of using `ToJson` trait
- make example code more readable
@bors bors closed this Jul 17, 2014
@bors bors merged commit 7beb550 into rust-lang:master Jul 17, 2014
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.

5 participants