Releases: IlikeChooros/lazyjson
Null value parsing
Allows null value parsing, for example:
extractor ex(
"{\"key\": "
"{"
"\"subkey\": [\"hello\", 1.5, true],"
"\"subkey2\": 2,"
"\"subkey3\": 3,"
"\"subNull\": null"
"},"
"\"key2\": \"value\"}"
);
String s = ex["random_key"].extract().as<String>();
int a = ex["key"]["subkey"][99].extract().as<int>();
float null = ex["key"]["subNull"].as<float>();
Code above is now perfectly fine (exception-free)
In previous versions it would cause an exception lazyjson::invalid_type
since the types didn't match
Fix compatibility issues
Fix Arduino Manager compatibility
Lazy JSON Extraction Library v1.0.0
Lazy JSON Extraction Library v1.0.0 Release Notes
I'm excited to announce the release of Lazy JSON Extraction Library v1.0.0. This library provides a simple and efficient way to extract JSON data in C++. It's designed to be lightweight and easy to use, making it ideal for resource-constrained environments.
New Features
- Lazy Extraction: Extract only the data you need, when you need it. This can significantly reduce memory usage and improve performance when working with large JSON documents.
- Easy to Use: The library provides a simple and intuitive API. You can extract data using the
[]
operator and string keys or integer indices. - Error Handling: The library includes robust error handling to help you catch and handle errors in your JSON data.
Improvements
- Caching: The
extractor
class now allows caching the current value. This can improve performance when extracting data from the same object or list, especially with larger structures.
Known Issues
- There is a slight memory leak when an exception is thrown. I am actively working on a fix for this issue.
Getting Started
To get started with the Lazy JSON Extraction Library, include the lazyjson.h
file in your project and create an extractor
object with your JSON data. You can then extract data using the []
operator and the extract()
method.
Feedback
Your feedback is important to us. If you have any issues or suggestions, please submit a pull request or create an issue.
License
This library is licensed under the MIT License. See the LICENSE file for more details.
Thank you for your support and I hope you find the Lazy JSON Extraction Library useful in your projects!