Results 1 to 40 of 40

Thread: [VB6/VBA] JSON parsing to built-in VBA.Collections with JSON Path support

Threaded View

  1. #4
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,538

    Re: [VB6/VBA] JSON parsing to built-in VBA.Collections

    Json-SpeedTest(Time:ms)1.3M Size data
    why ChilkatJsonObject quickly than cConstructor(rc5json)?
    Json-AB :Json Load string(parsing)+stringify
    Action Chilkat Rc5Json Json2.js
    JsonLoad 20.09 48.37 25.53
    stringify 12.04 35.75 171.96
    Json-AB 32.13 84.12 197.48


    Code:
    Sub Test_ChilkatJsonObject()
    'Visual Basic 6.0 Load JSON Data at Path
    'https://www.example-code.com/vb6/json_load_to_path.asp
    
    Dim p As String
    p = "{""a"": 'sssss', ""b"": 2, ""c"": { ""x"": 1, ""y"": 2 } }"
    
    Dim json As New ChilkatJsonObject
    Dim success As Long
    success = json.Load(p)
    json.EmitCompact = 0
    Debug.Print json.Emit()
    
    Dim q As String
    q = "{""mm"": 11, ""nn"": 22}"
    
    Dim c As ChilkatJsonObject
    Set c = json.ObjectOf("c")
    success = c.Load(q)
    
    '  See that x and y are replaced with mm and nn.
    Debug.Print json.Emit()
    
    End Sub
    Attached Images Attached Images  
    Last edited by xiaoyao; May 25th, 2020 at 01:26 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width