Some updates

Update #1
Version 1.01 of the cDictionary class is now available. It's a subclass of Microsoft's Scripting.Dictionary and it's a big speed-up compared to my cHashTable class. Unfortunately there are some limitations to what can be stored in the dictionary. The cHashTable can store any VDF type, including structs and struct arrays. The cDictionary can't. Arrays of any other type than String[] or Variant[] will also generate an error if inserted.

Avaliable methods are Set Value, Get Value, KeyExists, DeleteKey and Keys.

Update #2
Version 1.14 of cJSONParser is also available. All reduntant Ascii(c) calls have been removed. The speed gain from this was almost non-measurable, but the code looks better.

Number of milliseconds to parse a string of size x Kb.

All of the above is available on the downloads page.

Share

10 thoughts on Some updates

    • I feel like I’ve hit a wall regarding speed improvements. But I will add a ValueAtPath function in the next version. Then you can write code like:

      Get ValueAtPath of hJson "Customers[2].Contacts[1].Name" to sName

  1. Thanks for the reply Erik. I’ve only just seen it. I didn’t get and email notification of your post ?

    ValueAtPath would be very useful thanks.

    Anyway I’m back here as I’m now trying to use your packages to process tweet data like the one show below but it appears that you do not have any code for handling the control characters as it basically seems to strip the \ characters rather than for example the html element being converted to
    <blockquote class=…..
    it's
    003Cblockquote class=…..

    Original JSON
    {
    "cache_age": "3153600000",
    "url": "https:\/\/twitter.com\/stephenfry\/statuses\/525051448921686016",
    "height": null,
    "provider_url": "https:\/\/twitter.com",
    "provider_name": "Twitter",
    "author_name": "Stephen Fry",
    "version": "1.0",
    "author_url": "https:\/\/twitter.com\/stephenfry",
    "type": "rich",
    "html": "\u003Cblockquote class=\"twitter-tweet\" width=\"250\"\u003E\u003Cp\u003EMany, many thanks to \u003Ca href=\"https:\/\/twitter.com\/stephenfry\"\u003E@stephenfry\u003C\/a\u003E Fry for his support of our campaign to buy Blake's cottage at Felpham.\u003C\/p\u003E— Blake Cottage (@Blake_Society) \u003Ca href=\"https:\/\/twitter.com\/Blake_Society\/status\/525049642426572801\"\u003EOctober 22, 2014\u003C\/a\u003E\u003C\/blockquote\u003E\n\u003Cscript async src=\"\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"\u003E\u003C\/script\u003E",
    "width": 250
    }

  2. I am using this because it works in vdf 11.1 (thank you for that) but when using it in a BPO it complains about the Ignore_Error and Trap_Error messages (invalid message)

    Any Ideas?

Leave a Reply

Your email address will not be published. Required fields are marked *