JSON coder/decoder.
You must to patch Visual Basic 6 with Service Pack 6 before compiling with this TLB!
The ToJSON function can parse data with all kinds of errors, but parsing the JSON comments is not implemented.
The JSON comments are not part of the standard and slow down the parsing.
Formatted output:
Code:
[
{},
[
{},
[]
],
1,
[
4,
5.1,
{
"a":1,
"b":2
}
],
"3\u000B"
]
C-like empty items parsing (last empty is ignored):
Code:
[] []
[,] [null]
[,,] [null,null]
[null] [null]
[null,null] [null,null]
[,1] [null,1]
[,,2] [null,null,2]
[1,] [1]
[2,,] [2,null]
Skip whitespace function released as:
VB Code:
Private Const WhiteSpace = " " & vbTab & vbCrLf
Private Function SkipWhiteSpace() As Integer
i = i + (CharsCountPtrStr(i, WhiteSpace) * 2)
SkipWhiteSpace = MemInt(i)
End Function
Declared through Type Library functions:
Code:
CharsCountPtrStr = shlwapi.StrSpnW
MemInt = msvbvm60.GetMem2
FindCharsPtrStr = shlwapi.StrPBrkW
AllocString = oleaut32.SysAllocStringLen
Also in the project you can find:
Type library with sources (Usable VB and Windows API declarations are added during the programming from December 1, 2011)
Function to detect is file exists
Functions for reading and writing the whole binary and text files
Functions for reading and writing the file times
Function to detect is current thread active (IsAppActive)
Function to get window class
Rate and comment please!