Skip to content

DOCSP-49867: Add JsonReader example #636

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

Conversation

mcmorisi
Copy link
Collaborator

@mcmorisi mcmorisi commented May 20, 2025

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-49867

Staging Links

  • data-formats/extended-json
  • Self-Review Checklist

    • Is this free of any warnings or errors in the RST?
    • Did you run a spell-check?
    • Did you run a grammar-check?
    • Are all the links working?
    • Are the facets and meta keywords accurate?
    • Are the page titles greater than 20 characters long and SEO relevant?

    Copy link

    netlify bot commented May 20, 2025

    Deploy Preview for docs-csharp ready!

    Name Link
    🔨 Latest commit 57b5029
    🔍 Latest deploy log https://app.netlify.com/projects/docs-csharp/deploys/682f5033a027b00008e993c1
    😎 Deploy Preview https://deploy-preview-636--docs-csharp.netlify.app
    📱 Preview on mobile
    Toggle QR Code...

    QR Code

    Use your smartphone camera to open QR code link.

    To edit notification comments on pull requests, go to your Netlify project configuration.

    @@ -87,5 +104,4 @@ documentation:
    - `JsonWriter <{+new-api-root+}/MongoDB.Bson/MongoDB.Bson.IO.JsonWriter.html>`__
    - `JsonReader <{+new-api-root+}/MongoDB.Bson/MongoDB.Bson.IO.JsonReader.html>`__
    - `JsonWriterSettings <{+new-api-root+}/MongoDB.Bson/MongoDB.Bson.IO.JsonWriterSettings.html>`__
    - `JsonReaderSettings <{+new-api-root+}/MongoDB.Bson/MongoDB.Bson.IO.JsonReaderSettings.html>`__
    Copy link
    Collaborator Author

    Choose a reason for hiding this comment

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

    According to Rishit and Boris, this isn't worth discussing.

    Copy link
    Contributor

    @rustagir rustagir left a comment

    Choose a reason for hiding this comment

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

    lgtm with a small phrasing suggestion

    @mcmorisi mcmorisi requested review from a team, papafe and rstam and removed request for a team and papafe May 20, 2025 17:55
    Console.WriteLine(document.ToJson());
    }
    // end-read-ejson-reader
    }
    Copy link
    Collaborator

    Choose a reason for hiding this comment

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

    There's a much easier way to parse JSON into a BsonDocument:

    var document = BsonDocument.Parse(json);
    

    Copy link
    Collaborator

    Choose a reason for hiding this comment

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

    I'm not sure what the point of this example is. It's just a harder way to do something that can be done more simply.

    Copy link
    Collaborator Author

    @mcmorisi mcmorisi May 22, 2025

    Choose a reason for hiding this comment

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

    So for context, the topic list I've been working off of lists JsonReader as a class to discuss.

    If you don't feel that a JsonReader example is necessary for understanding Extended JSON then I'm fine to cancel this PR.

    @mcmorisi mcmorisi requested a review from rstam May 22, 2025 16:27
    Copy link
    Collaborator

    @rstam rstam left a comment

    Choose a reason for hiding this comment

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

    LGTM

    @mcmorisi mcmorisi merged commit 7478472 into mongodb:docsp-45382-comp-cvg May 23, 2025
    6 checks passed
    @mcmorisi mcmorisi deleted the DOCSP-49867-extended-json-fix branch May 23, 2025 13:15
    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