Skip to content

JSON recipe#555

Closed
shivamk01 wants to merge 5 commits intomasterfrom
development
Closed

JSON recipe#555
shivamk01 wants to merge 5 commits intomasterfrom
development

Conversation

@shivamk01
Copy link

Part of tracking issue #440. This adds a more complex example of a single producer pushing data to multiple consumers using a bounded channel and each of the consumers pushing data to a single consumer.

I think this is useful because it demonstrates some of the considerations needed when dealing with both bounded channels and receiving via an iterator.

@AndyGauge AndyGauge changed the title Adds crossbeam channel example of a parallel data pipeline. JSON recipe Dec 14, 2019
Copy link
Contributor

@AndyGauge AndyGauge left a comment

Choose a reason for hiding this comment

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

Thank you so much for your contribution. Sorry for taking a few months to review. I'd be happy to include json as a recipe.

README.md Outdated
@@ -1,117 +0,0 @@
# Cookin' with Rust
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not following the intentions of deleting the README file


fn main() {
skeptic::generate_doc_tests(&["README.md"]);
let paths = fs::read_dir("./pages/").unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

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

If this is meant to resolve some of the errors we are experiencing I'd really appreciate it broken out of the addition of examples

}
}

"#).unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

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

Please see proper error handling in cookbook.

}
};

assert_eq!(parsed, instantiated);
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than comparing the object is equal, please show how to traverse the JSON document to compare individual pieces of data.

#JSON

##JSON implementation in Rust:

Copy link
Contributor

Choose a reason for hiding this comment

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

Would you mind including a sentence or two about what this recipe demonstrates, please include links to the primary sources of documentation.

MIT/Apache-2.0

<!-- Links -->
[json-badge]: https://img.shields.io/crates/v/rustc-serialize.svg?label=json
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the badges are in /src/links.md

@Kandeel4411
Copy link

Hello @AndyGauge ! Just wanted to say that I think this is spam. if you see this similar MR, you will notice he is just copying the description and merging any random branch. He was properly trying to submit anything for the old hacktoberfest ( seems to be doing it again )

@AndyGauge
Copy link
Contributor

Closing - this PR is from 2019 and is based on an ancient branch structure (pages/ directory, old build.rs). Master already has JSON examples using serde_json and the codebase has been completely restructured since.

@AndyGauge AndyGauge closed this Mar 8, 2026
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