Skip to content

Commit

Permalink
Update NDJSON documentation (#1080)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenberry authored Jun 12, 2024
1 parent feb2dbd commit 407269b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -827,14 +827,14 @@ struct glz::meta<A> {

The quoted JSON numbers will be parsed directly into the `double` and `std::vector<uint32_t>`. The `glz::quoted` function works for nested objects and arrays as well.

## NDJSON Support
## JSON Lines (NDJSON) Support

Glaze supports [Newline Delimited JSON](http://ndjson.org) for array-like types (e.g. `std::vector` and `std::tuple`).
Glaze supports [JSON Lines](https://jsonlines.org) (or Newline Delimited JSON) for array-like types (e.g. `std::vector` and `std::tuple`).

```c++
std::vector<std::string> x = { "Hello", "World", "Ice", "Cream" };
std::string s = glz::write_ndjson(x);
glz::read_ndjson(x, s);
std::string s = glz::write_ndjson(x).value_or("error");
auto ec = glz::read_ndjson(x, s);
```
# More Features
Expand Down

0 comments on commit 407269b

Please sign in to comment.