Skip to content

Conversation

@ahsonkhan
Copy link
Contributor

@ahsonkhan ahsonkhan commented Dec 3, 2018

Summary

Utf8JsonReader sample showcasing how to use the APIs to accompany the .NET Core 3.0 preview 1 release.

  • Includes a synchronous sample where JSON data is read from a file (~2 MB).
  • Includes an asynchronous sample where JSON data is read from the web.

Borrowed the data from: https://github.com/Hipo/university-domains-list (MIT License)

E:\GitHub\Fork\samples\snippets\csharp\how-to\json> dotnet run -c Release
Expected output:

Reading JSON from file, sync: 827 out of 9674 universities worldwide have names starting with 'University of' (i.e. 8.55%)!
Reading JSON from web, async: 209 out of 2157 American universities have names starting with 'University of' (i.e. 9.69%)!
Reading JSON from web, async: 827 out of 9674 universities worldwide have names starting with 'University of' (i.e. 8.55%)!

cc @richlander, @glennc, @terrajobst, @stephentoub

Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

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

Overall, this is great.

I had one small suggestion, and then once you've address Stephen's comment, we'll merge.

@ahsonkhan
Copy link
Contributor Author

This is ready to merge.

@richlander
Copy link
Member

I think this sample should be in core directory. Why in the csharp directory?

@BillWagner
Copy link
Member

@ahsonkhan @richlander

Other than the folder location, this is ready to go. It likely fits better under core than under C# because the concepts it explains are more about the library than about the language.

Is there an article that will accompany this sample? Where will that go? We try to mirror the sample folder structure with the docs folder structure. That can help us find the right location.

@ahsonkhan
Copy link
Contributor Author

I think this sample should be in core directory.

Other than the folder location, this is ready to go.

Done. Moved to a new "whats new in 30" folder.

@richlander
Copy link
Member

Sorry to be so picky and for not being specific ... I was expecting something more like ~/core/json

@ahsonkhan
Copy link
Contributor Author

Sorry to be so picky and for not being specific ... I was expecting something more like ~/core/json

That's easy enough to fix :)

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.

4 participants