It would be convenient if you could support single quotes
Json.JsonStr = "{'abc':['item1','item2','item3'] ,'KKK':333 ,'data':{'ob1':{'a':'aaa'} , 'cf':'cf value','arr2':[1,2], 'denominazione':'value2'} }"
Code:Private Function pvJsonParse(uCtx As JsonContext) As Variant With uCtx Fh = pvJsonGetChar(uCtx) Select Case Fh Case 34, 39 '--- " pvJsonParse = pvJsonGetString(uCtx, Fh) ***** case 123 Fh = pvJsonGetChar(uCtx) 'If Fh <> 34 then 'abcd If Not (Fh = 34 Or Fh = 39) Then '--- "" ' ****** sKey = pvJsonGetString(uCtx, Fh)Code:Private Function pvJsonGetString(uCtx As JsonContext, YH3439 As Integer) As String Case 0, 34, 39, 92 '--- " \ sText = Space$(lIdx) Call CopyMemory(ByVal StrPtr(sText), .Text(.Pos), LenB(sText)) pvJsonGetString = pvJsonGetString & sText If nChar = YH3439 Then '--- " .Pos = .Pos + lIdx + 1 Exit For




Reply With Quote