This package includes two functions:
JSON_FromObj takes an object and returns a string that expresses the object's contents.
JSON_ToObj takes a JSON-formatted string and returns an object containing the structured data it represents.
AHK-Lib-JSON.zip
Also on GitHub
The serializer does not conform exactly to the official JSON standard (see http://www.json.org). See the included README for details.
[Func] JSON-like (de)serializer (AHK-L)
Re: [Func] JSON-like (de)serializer (AHK-L)
Cool!
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: [Func] JSON-like (de)serializer (AHK-L)
So the generated json strings aren't useable in php scripts?VxE wrote:The serializer does not conform exactly to the official JSON standard (see http://www.json.org). See the included README for details.
"Nothing is quieter than a loaded gun." - Heinrich Heine
Re: [Func] JSON-like (de)serializer (AHK-L)
I'm not sure what you mean... I don't know what php considers "usable".Alibaba wrote:So the generated json strings aren't useable in php scripts?
That disclaimer is there because I was annoyed at all of the other JSON libraries that claim (either directly or implicitly) to completely conform to the standard, when they do not.
The major points of non-conformance in my "stringify" function are:
- Numbers with an exponent (e.g: 123e+45) are treated as strings. The JSON standard sees them as numbers.
Hexadecimal numbers are treated as numbers. The JSON standard sees them as strings.
Re: [Func] JSON-like (de)serializer (AHK-L)
Ok, this are very little differences to the standard, i don't think they mind.
"Nothing is quieter than a loaded gun." - Heinrich Heine
Re: [Func] JSON-like (de)serializer (AHK-L)
Very nice functions VxE What exactly is required to use your code as far as the copyright? Can I use it in my scripts? Can I edit the code?
John H Wilson III 05/29/51 - 03/01/2020. You will be missed.AHK Studio OSDGUI Creator
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
Donations
Discord
All code is done on a 64 bit Windows 10 PC Running AutoHotkey x32
Re: [Func] JSON-like (de)serializer (AHK-L)
You have permission to use the code in any manner you see fit, as long as you meet the conditions of the license, which basically says you must include the copyright notice and license text with any distributions that include the function code.
It's a very loose license.
It's a very loose license.
Return to “Scripts and Functions (v1)”
Who is online
Users browsing this forum: No registered users and 105 guests