УкраїнськаEnglishmRussian
Вхід/Новий
У темі немає нових постів

json library


Автор Повідомлення
Повідомлення створено: 08. 04. 2025 [23:07]
arccis
Arkadii Kysil
Автор теми
Зареєстрован(а) с: 18.11.2023
Повідомлення: 8
Hello everyone. I have implemented some functions for working with json. In the attachments there is a project with json.db. There is also a set of json files and a python script for checking the functions.

About json: https://www.json.org/json-en.html

Main functions is:
areBracketsBalanced
decode_unicode_esc (decode /uXXXX to UTF8-symbol )
encode_unicode_esc (ecode UTF8-symbol to /uXXXX )
deserialize (load/import object from string)
getOneValue (get Value without recursion)
pretty (structured text like tree + decode \uXXXX)
searchFirstJson
serialize (save/export object to string)

I am not a professional programmer, but I tried to cover all the code with tests. I will gladly accept comments.
Вкладений файл

json.zip (Тип файлу: application/zip, Розмір: 28.36 кілобайтів) — 17 завантажень
Повідомлення створено: 10. 04. 2025 [09:48]
roman
Roman Savochenko
Moderator
Contributor
Developer
Зареєстрован(а) с: 12.12.2007
Повідомлення: 3769
"arccis" wrote:

Hello everyone. I have implemented some functions for working with json. In the attachments there is a project with json.db. There is also a set of json files and a python script for checking the functions.

...

I am not a professional programmer, but I tried to cover all the code with tests. I will gladly accept comments.

That is are you about "comments" or you want to include this in the standard OpenSCADA libraries?

If you are about the first, then I have no need in json right now for throw down all other and start to develop-debug-test your code. :)

If you are about the second with documenting and following support yourself, then say that directly, go to http://oscada.org/wiki/Special:MyLanguage/Documents/How_to/Create_module and satisfy the requirements!

PS: I am going to expand shortly the document by a part of the code creation for internal libraries with User API, but most the requirements there is actual.

Learn, learn and learn better than work, work and work.
Повідомлення створено: 11. 04. 2025 [15:41]
arccis
Arkadii Kysil
Автор теми
Зареєстрован(а) с: 18.11.2023
Повідомлення: 8
ok, I'll read the requirements and write documentation for the functions like in other OpenSCADA libraries. By comments I meant feedback from people who will use the library.



10514