youngchan1988 / json_editor Goto Github PK
View Code? Open in Web Editor NEWA json editor on flutter
License: BSD 3-Clause "New" or "Revised" License
A json editor on flutter
License: BSD 3-Clause "New" or "Revised" License
When the contents of the json editor are emptied, the onValueChanged function is not getting triggered
Thank you for the great package. It works perfectly fine when dealing with the English language.
It would be great if you can take some time from your busy schedule to add support for this feature. Or you can point me to some direction so I can implement it myself and create a pull request.
When JSON contains the Khmer language it doesn't parse and format the string.
I looked into the code and found out that the package only deals with English Unicode only. It would be great if you can add the language support for Khmer as well so it parses and formats the Khmer language just like it does with English.
Example 1:
At the end inside verb it ends with double closing curly bracket } whereas there should be only one. Also when editing the closing curly bracket } after def key value, it can't be deleted.
Here is the JSON so you can test it.
{
"uid": "61ea4987851f4038c8fcfb26",
"hw": "put a stop to",
"syllable": [
{
"syl": "put a stop to"
}
],
"fl": "v.",
"verb": [
{
"def": "ដាក់ការបញ្ឈប់ទៅ។ "
}
],
}
Example 2:
In this example, there should be a closing square bracket and a closing curly bracket. But there is not and the editor is not throwing any error.
Here is the JSON so you can test it.
{
"uid": "61ea4987851f4038c8fcfb23",
"hw": "put a flea in one's ear",
"syllable": [
{
"syl": "put a flea in one's ear"
}
],
"fl": "v.",
"verb": [
{
"def": "ផ្លុំត្រចៀក; និយាយរញ៉ាំរញ៉ូវ; ទន្ទេញទន្ទូររឿយៗ។ "
}
],
}
https://unicode.org/charts/PDF/U1780.pdf
I want to support the Khmer characters listed in the table below
CHARACTER TO UNICODE, CONVERSIONS
I think you'll be mostly interested in Decimal values, as this is what you're using for english.
Character | Decimal Value | U+HEX | UTF-16 code units |
---|---|---|---|
ក | 6016 | U+1780 | 1780 |
ខ | 6017 | U+1781 | 1781 |
គ | 6018 | U+1782 | 1782 |
ឃ | 6019 | U+1783 | 1783 |
ង | 6020 | U+1784 | 1784 |
ច | 6021 | U+1785 | 1785 |
ឆ | 6022 | U+1786 | 1786 |
ជ | 6023 | U+1787 | 1787 |
ឈ | 6024 | U+1788 | 1788 |
ញ | 6025 | U+1789 | 1789 |
ដ | 6026 | U+178A | 178A |
ឋ | 6027 | U+178B | 178B |
ឌ | 6028 | U+178C | 178C |
ឍ | 6029 | U+178D | 178D |
ណ | 6030 | U+178E | 178E |
ត | 6031 | U+178F | 178F |
ថ | 6032 | U+1790 | 1790 |
ទ | 6033 | U+1791 | 1791 |
ធ | 6034 | U+1792 | 1792 |
ន | 6035 | U+1793 | 1793 |
ប | 6036 | U+1794 | 1794 |
ផ | 6037 | U+1795 | 1795 |
ព | 6038 | U+1796 | 1796 |
ភ | 6039 | U+1797 | 1797 |
ម | 6040 | U+1798 | 1798 |
យ | 6041 | U+1799 | 1799 |
រ | 6042 | U+179A | 179A |
ល | 6043 | U+179B | 179B |
វ | 6044 | U+179C | 179C |
ឝ | 6045 | U+179D | 179D |
ឞ | 6046 | U+179E | 179E |
ស | 6047 | U+179F | 179F |
ហ | 6048 | U+17A0 | 17A0 |
ឡ | 6049 | U+17A1 | 17A1 |
អ | 6050 | U+17A2 | 17A2 |
ឣ | 6051 | U+17A3 | 17A3 |
ឤ | 6052 | U+17A4 | 17A4 |
ឥ | 6053 | U+17A5 | 17A5 |
ឦ | 6054 | U+17A6 | 17A6 |
ឧ | 6055 | U+17A7 | 17A7 |
ឨ | 6056 | U+17A8 | 17A8 |
ឩ | 6057 | U+17A9 | 17A9 |
ឪ | 6058 | U+17AA | 17AA |
ឫ | 6059 | U+17AB | 17AB |
ឬ | 6060 | U+17AC | 17AC |
ឭ | 6061 | U+17AD | 17AD |
ឮ | 6062 | U+17AE | 17AE |
ឯ | 6063 | U+17AF | 17AF |
ឰ | 6064 | U+17B0 | 17B0 |
ឱ | 6065 | U+17B1 | 17B1 |
ឲ | 6066 | U+17B2 | 17B2 |
ឳ | 6067 | U+17B3 | 17B3 |
឴ | 6068 | U+17B4 | 17B4 |
឵ | 6069 | U+17B5 | 17B5 |
ា | 6070 | U+17B6 | 17B6 |
ិ | 6071 | U+17B7 | 17B7 |
ី | 6072 | U+17B8 | 17B8 |
ឹ | 6073 | U+17B9 | 17B9 |
ឺ | 6074 | U+17BA | 17BA |
ុ | 6075 | U+17BB | 17BB |
ូ | 6076 | U+17BC | 17BC |
ួ | 6077 | U+17BD | 17BD |
ើ | 6078 | U+17BE | 17BE |
ឿ | 6079 | U+17BF | 17BF |
ៀ | 6080 | U+17C0 | 17C0 |
េ | 6081 | U+17C1 | 17C1 |
ែ | 6082 | U+17C2 | 17C2 |
ៃ | 6083 | U+17C3 | 17C3 |
ោ | 6084 | U+17C4 | 17C4 |
ៅ | 6085 | U+17C5 | 17C5 |
ំ | 6086 | U+17C6 | 17C6 |
ះ | 6087 | U+17C7 | 17C7 |
ៈ | 6088 | U+17C8 | 17C8 |
៉ | 6089 | U+17C9 | 17C9 |
៊ | 6090 | U+17CA | 17CA |
់ | 6091 | U+17CB | 17CB |
៌ | 6092 | U+17CC | 17CC |
៍ | 6093 | U+17CD | 17CD |
៎ | 6094 | U+17CE | 17CE |
៏ | 6095 | U+17CF | 17CF |
័ | 6096 | U+17D0 | 17D0 |
៑ | 6097 | U+17D1 | 17D1 |
្ | 6098 | U+17D2 | 17D2 |
៓ | 6099 | U+17D3 | 17D3 |
។ | 6100 | U+17D4 | 17D4 |
៕ | 6101 | U+17D5 | 17D5 |
៖ | 6102 | U+17D6 | 17D6 |
ៗ | 6103 | U+17D7 | 17D7 |
៘ | 6104 | U+17D8 | 17D8 |
៙ | 6105 | U+17D9 | 17D9 |
៚ | 6106 | U+17DA | 17DA |
៛ | 6107 | U+17DB | 17DB |
ៜ | 6108 | U+17DC | 17DC |
៝ | 6109 | U+17DD | 17DD |
០ | 6112 | U+17E0 | 17E0 |
១ | 6113 | U+17E1 | 17E1 |
២ | 6114 | U+17E2 | 17E2 |
៣ | 6115 | U+17E3 | 17E3 |
៤ | 6116 | U+17E4 | 17E4 |
៥ | 6117 | U+17E5 | 17E5 |
៦ | 6118 | U+17E6 | 17E6 |
៧ | 6119 | U+17E7 | 17E7 |
៨ | 6120 | U+17E8 | 17E8 |
៩ | 6121 | U+17E9 | 17E9 |
៰ | 6128 | U+17F0 | 17F0 |
៱ | 6129 | U+17F1 | 17F1 |
៲ | 6130 | U+17F2 | 17F2 |
៳ | 6131 | U+17F3 | 17F3 |
៴ | 6132 | U+17F4 | 17F4 |
៵ | 6133 | U+17F5 | 17F5 |
៶ | 6134 | U+17F6 | 17F6 |
៷ | 6135 | U+17F7 | 17F7 |
៸ | 6136 | U+17F8 | 17F8 |
៹ | 6137 | U+17F9 | 17F9 |
I think the package needs to accept null
as a valid value and have its own style.
Hello
There is a problem when I try to parse such json:
{
"array": [
{
"first_child": [
{
"text": "First item"
},
{
"text": "Second item"
}
],
"second_child": [
{
"text": "First item"
},
{
"text": "Second item"
}
]
}
]
}
I checked this json in JSON Editor Online and it's worked. But the JsonEditor widget show:
"Syntax error: Invalid ',' at line 7 position 94".
Hello, at the first I should say thanks for your awesome repo
Anyway I have some issue with that
onValueChanged
JsonElement
:{
"test": ""
}
jsonString
with a comment the comment does not display:JsonEditor.string(
jsonString: '''
{
// Insert your data here
}
''',
enabled: true,
onValueChanged: (value) {
document = value;
},
),
When editing the text, there is a delay of 1sec since the text was changed to when the onValueChanged
callback is triggered.
There should be a way to disable that.
First of all I want to say THANKS for the great package :)
I thing it would be great if we could have line number in this package. I would contribute if I could :)
I am using this editor in a StatefulWidget to display a JSON string. When updating the state of the widget with the new JSON string the editor is not changing. I checked your code, the editor is only intended to update itself when not enabled.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.