Json Builder
json_builder is a Flutter package that provides an intuitive visual interface for creating and editing JSON objects. It allows you to build, edit, and manipulate JSON structures in a simple and visually appealing way.
Features
- Visual interface for creating and editing JSON structures
- Support for all JSON data types: strings, numbers, booleans, objects, and arrays
- Interactive editing with dialogs for modifying values
- Visualization with colors for different data types
- Functionality to copy formatted JSON to the clipboard
Installation
Add json_builder to your pubspec.yaml file:
dependencies:
json_builder: latest
Then run:
flutter pub get
Usage
import 'package:json_builder/json_builder.dart';
// Create a new JSON object
Jon json = {
'name': 'John Doe',
'age': 30,
'isMarried': false,
'address': {
'street': '123 Main St',
'city': 'Anytown',
'state': 'NY',
'zip': '12345'
},
'children': ['Alice', 'Bob', 'Charlie']
};
// Use the JsonBuilder widget to edit the JSON object
JsonBuilder(
json: json,
onChanged: (json) {
// Handle changes to the JSON object
setState(() => this.json = json);
},
)
Full Example
Check the examples directory for a complete implementation.

License
This project is licensed under the MIT License.
Libraries
- json_builder
- This library is used to easily build a JSON object visually.