icentral-json
Overview
icentral-json is a Rust crate that provides a robust mechanism for constructing JSON hierarchies using labeled two-level member configurations. It utilizes macros for ease of use and implements serialization for transforming complex data structures into JSON strings seamlessly. This crate serves as a utility for developers seeking to manipulate nested data arrangements and transform them efficiently into JSON format, leveraging the powerful capabilities of the Rust macro system.
Features
- Macros: Provides macros such as
allow_twolevel_named_membersandallow_twolevel_named_memberfor creating named JSON structures exhibiting two-level nested hierarchies. - Serialization: Implements serialization via the
serdecrate, allowing for easy conversion of structs into JSON strings with the methodto_json(). - Struct Definition: Features a core struct
BetweennessJsonBuilderwhich encapsulates the address patterns between parent and child nodes, which can be instantiated and processed into JSON.
Usage
To use this crate, add it as a dependency in your Cargo.toml:
[]
= "0.1.0"
Example
use ;
use ;
// Assuming 'ParentAddress' and 'ChildAddress' are properly defined and deriving Serialize
let parent_address = new;
let child_address = new;
let json_builder = new;
let json_representation = json_builder.to_json;
println!;
License
icentral-json is distributed under the MIT License. See LICENSE for more information.
This README.md file was generated by an AI model and may not be 100% accurate; however, it should be pretty good.
This crate is in the process of being translated from c++ to rust. Currently, it still needs exhaustive testing. It is likely there currently exist many glitches which need to be fixed before proper usage. This crate is based on the original icentral program developed by Fuad Jamor. Please see the following repository for details: https://github.com/fjamour/icentral.
For progress updates, see the workspacer rust project.