json_studio library
A modern JSON editor for Flutter with tree and text views, search, code folding and precise error marks. Works on every platform, including Flutter Web.
Classes
- JsonCodeController
- Model of the text view: document, selection, history, folding and search.
- JsonDiagnostic
- A problem found in a JSON text.
- JsonParseResult
- The outcome of parseJson.
- JsonPath
- An immutable location inside a JSON document.
- JsonStudio
- A modern JSON editor with a tree view and a text (code) view.
- JsonStudioController
- Owns the document of a JsonStudio and exposes everything you may want to drive from outside: switching views, formatting, searching, folding, undo/redo and programmatic edits.
- JsonStudioLabels
- Every user-facing string of JsonStudio. Override what you need, or use a preset such as JsonStudioLabels.turkish.
- JsonStudioTheme
- Visual configuration of JsonStudio.
Enums
- JsonDiagnosticKind
- What kind of problem a JsonDiagnostic describes.
- JsonNodeType
- The JSON type of a value.
- JsonStudioMode
- The two ways a document can be shown.
Functions
-
encodeJson(
Object? value, {int indent = 2}) → String -
Pretty prints
valuewithindentspaces. -
parseJson(
String text) → JsonParseResult -
Parses
textas strict JSON and reports every bracket problem plus the first syntax error with an exact position. -
sortKeysDeep(
Object? value) → Object? - Recursively sorts all object keys alphabetically.