login about faq

Hello,

I purchased the ActiveX bundle and am trying to parse JSON text. It throws an error loading the .jsonObject in Visual Foxpro and it does not appear to be listed in the registry.

loObject = CreateObject('Chilkat_9_5_0.JsonObject')

Is there another DLL that I must register to get this feature?

Thanks, Andy

asked Feb 19 at 09:49

agoeddeke's gravatar image

agoeddeke
12

edited Feb 19 at 09:50


Hi Andy,

The JSON functionality will be in the next Chilkat version release (in early March).

Here's a pre-release for testing:

32-bit Download: http://www.chilkatsoft.com/download/preRelease/ChilkatAx-9.5.0-win32.zip
64-bit Download: http://www.chilkatsoft.com/download/preRelease/ChilkatAx-9.5.0-x64.zip

link

answered Feb 19 at 09:57

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

edited Feb 19 at 09:57

Thanks! I'll give it a try.

Andy

link

answered Feb 19 at 10:24

agoeddeke's gravatar image

agoeddeke
12

When do you Think to release the DLL with Json for ActiveX?

I can create object Http, HttpResponse,... but I can't create

CreateObject("Chilkat_9_5_0.JsonObject")

Thanks Lorenzo

link

answered Mar 03 at 10:26

wmplollo's gravatar image

wmplollo
11

edited Mar 03 at 10:36

Chilkat will officially begin the v9.5.0.56 release in approx. 6 days.

link

answered Mar 04 at 10:39

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Hi Matt, what are the plans for JsonObject. Will it be a full featured Json class similar to CkXml (for Xml) for both parsing and building Json, or will it be a parser only?

(Mar 04 at 11:28) roan98dk

I have been evaluating it and it seems to do a good job of both parsing AND building Json.

(Mar 04 at 11:45) agoeddeke

Here's the very latest pre-release:

32-bit Download: http://www.chilkatsoft.com/download/preRelease/ChilkatAx-9.5.0-win32.zip

64-bit Download: http://www.chilkatsoft.com/download/preRelease/ChilkatAx-9.5.0-x64.zip

The online reference documentation and examples are already published..

link

answered Mar 04 at 11:48

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

I hope that just because the pre-release is for ActiveX, this does not mean that it will not be available for other languages (e.g. C++) and platforms as well?

(Mar 04 at 13:00) roan98dk

I just wanted to add, that I especially would love to see this functionally, so that I can parse and build Json the same way in VC++ and C#. I currently use Jansson (C library) in VC++ and Newtonsoft.Json for C#. There might already be libraries in the market that support both languages, but I am familiar with Chilkat and especially love the built-in error logging :-)

(Mar 04 at 13:09) roan98dk

Thanks! The JsonObject and JsonArray classes will be across-the-board available in all supported programming languages on all operating systems. This is always the case with Chilkat, except for a few exceptions. (For example, the StreamConnector class is new in the next version and will make it possible to use .NET System.IO.Stream objects w/ Chilkat. So that will be limited to C#/VB.NET)

(Mar 04 at 13:18) chilkat ♦♦

I did some quick testing of Json for VC++ and have the following recommendation for improvement. While creating a complex structure, I will often have to call json.AddObjectAt(-1) or json.AddArrayAt(-1, "node name") and then immediately after a call to json.ObjectAt(json.get_Size() - 1) or json.ArrayAt(json.get_Size() - 1) in order to get a pointer to the newly added object or array.

This clutters up code unnecessarily and it would look much nicer if AddObjectAt() and AddArrayAt() returned a pointer to the newly created node, e.g. CkJsonObject AddObjectAt(int index, const char name).

Even returning the index of the created node would improve performance slightly, so that I can used that index in the next call as opposed to the repeated calls to get_Size(). I would prefer the pointer behavior though.

Since index will often be set to -1 for appending, it might also be a good idea to change signatures to e.g. AddObjectAt(const char name, int index = -1), so that -1_ becomes the default value and does not have to be specified explicitly. Alternately add another method _AddObject(const char name) or perhaps better AppendObject(const char *name).

I understand if the choices were made due to limitations in some programming languages, but otherwise these ammendments would make the class a bit easier to work with.

link

answered Mar 14 at 09:28

roan98dk's gravatar image

roan98dk
326192034

I hear you, but I wanted to avoid the same problems experienced with the CkZip object. In that API, there are methods such as AppendString, AppendData, etc, which return a CkZipEntry * object. The problem is that countless developers would call the method like this:

zip.AppendString("test");
And this created a memory leak -- because AppendString returns a CkZipEntry object. So I wanted to avoid the same mistake which generates a lot of support email from programmers claiming the Chilkat leaks memory..

Also, it may be that a program doesn't care to receive the new item that was added, and it's more efficient to not return anything, and then only get it if needed.

As time goes on, I'll think about adding features to make the API better, but it's best (for now) to let it burn in a bit before making decisions I'll have to live with for a long time. :-)

link

answered Mar 14 at 21:18

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

Fair enough :-)

Did you consider the approach of letting the generated pointer become a function argument reference value instead, e.g. bool AddObjectAt(int index, const char *name, CkJsonObject &object)?

That would be similar to how CkByteData and CkString are often passed as arguments to functions instead of as return values, e.g. void get_LastErrorText(CkString &str) vs. const char *lastErrorText(void). allows the developer to make the decision.

(Mar 15 at 04:10) roan98dk
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×96
×16

Asked: Feb 19 at 09:49

Seen: 1,030 times

Last updated: Mar 15 at 04:10

powered by OSQA