here is a fix for a bug in string parsing routine and several other changes.
+ added port to D2009 by Daniele Teti, thanx a lot! really, i haven't the 2009 version, so i can't play with it. I was add USE_D2009 directive below, disabled by default
* fixed two small bugs in parsing object: errors with empty object and list; thanx to RSDN's delphi forum members
* fixed " Value deletion is broken" tracker issue, thanx to anonymous sender provided code for tree version... read more
+ a declaration of Field property moved from TlkJSONobject to TlkJSONbase; thanx for idea to Andrey Lukyanov; this improve objects use, look the bottom of SAMPLE2.DPR
* fixed field name in TlkJSONobject to WideString
+ added a code for generating readable JSON text, sended to me by Kusnassriyanto Saiful Bahri, thanx to him!
* from this version, library distributed with BSD license, more pleasure for commercial programmers :)
* was rewritten internal storing of objects, repacing hash tables with balanced trees (AA tree, by classic author's variant). On mine machine, with enabled fastmm, tree variant is about 30% slower in from-zero creation, but about 50% faster in parsing; also deletion of objects will be much faster than a hash-one.
fix mistypes in diffrent places; thanx for reports to Aleksandr Fedorov and Tobias Wrede
fix small bug in new text generation routine, check library for leaks by fastmm4; thanx for idea and comments for Glynn Owen
* some fixes in new code (mistypes, mistypes...)
* also many fixes by ideas of Henri Gourvest - big thanx for him again; he send me code for thread-safe initializing of hash table, some FPC-compatible issues (not tested by myself) and better code for localization in latest delphi versions; very, very big thanx!
* rewritten procedure of json text generating, with wich work of it speeds up 4-5 times (on test) its good for a large objects
* started a large work for making source code self-doc (not autodoc!)
+ add functions to list and object:
function getInt(idx: Integer): Integer;
function getString(idx: Integer): String;
function getWideString(idx: Integer):WideString;
function getDouble(idx: Integer): Double;
function getBoolean(idx: Integer): Boolean;
+ add overloaded functions to object:
function getDouble(nm: String): Double; overload;
function getInt(nm: String): Integer; overload;
function getString(nm: String): String; overload;
function getWideString(nm: String): WideString; overload;
function getBoolean(nm: String): Boolean; overload;
* changed storing mech of TlkJSONcustomlist descendants from dynamic array to TList; this gives us great speedup with lesser changes; thanx for idea to Henri Gourvest
* also reworked hashtable to work with TList, so it also increase speed of work
* fix small bug in work with WideStrings(UTF8), thanx to IVO GELOV to description and sources
+ add TlkJSONFuncEnum and method ForEach in all TlkJSONcustomlist descendants
+ add property UseHash(r/o) to TlkJSONobject, and parameter UseHash:Boolean to object constructors; set ti to false allow to disable using of hash-table, what can increase speed of work in case of objects with low number of methods(fields); [by default it is true]
+ added conditional compile directive DOTNET for use in .Net based delphi versions; remove dot in declaration below (thanx for idea and sample code to Tim Radford)
+ added property HashOf to TlkHashTable to allow use of users hash functions; on enter is widestring, on exit is cardinal (32 bit unsigned). Original HashOf renamed to DefaultHashOf
* hash table object of TlkJSONobject wrapped by property сalled HashTable
* fixed some minor bugs
+ add object TlkJSONstreamed what descendant of TlkJSON and able to load/save JSON objects from/to streams/files.
* fixed small bug in generating of unicode strings representation
+ add properties NameOf and FieldByIndex to TlkJSONobject
* fix small error in parsing unicode chars
* small changes in hashing code (try to speed up)
+ add overloaded functions to list and object
+ add enum type TlkJSONtypes
+ add functions: SelfType:TlkJSONtypes and
SelfTypeName: String to every TlkJSONbase child
* fix mistype 'IndefOfName' to 'IndexOfName'
* fix mistype 'IndefOfObject' to 'IndexOfObject'
One small bug fixed; thanx to Chris Matheson
There are first public release of library, it fully-functional and used in mine software. Library release JSON specifiaction.