Convert dictionary to Json

Before I reinvent the wheel: does anyone have some code to convert a dictionary to Json?

There is an example in the docs:

The JSONItem class will auto convert this for you:

Dim js As JSONItem = myDictionary

Keep in mind that JSON keys are case sensitive, and the case of the keys you have in the dictionary will be what you get in the JSONItem.

1 Like

That’s really clever. Thanks, Glen and Eli.

Senior moment: Greg and not Glen.

In all my years, I’ve never been called Glen before. Usually, people just call me Stretch.

Because u r probably the tallest in XOJO inc

Shorty :stuck_out_tongue:

Which goes right along with calling the bald guy “Curly”, the heavy set fellow “Slim” or the really skinny guy “Tank”

I think that makes me more “Curly” than anything :slight_smile:

Gregs among the very tallest people I’ve ever met.
Did used to work with a cop who was 7 foot something but he seemed nearly as wide as he was tall. How towered over me as I’m only 5’ 7" ish on a good day.
This fellow could bench press a LOT - always won the annual “strong man” competitions held internally.
No neck - shoulders right up to his head and fitting shirts for him was a pain - tailors hated him as they had to take 22 inch neck shirts & increase them, open the backs to make them bigger. No off the rack stuff fit him he was such a big guy.
Most everything needed custom alterations - and try & find a belt to fit him. HA ! Custom made as well by a local boot & hat maker :stuck_out_tongue:

His nick name was “Teddy Bear” and you can guess why.
Nice guy

wonder where do one use JSON??

makes for a nice file format for saving certain kinds of data

some web services use json-rpc

JSON is also more compact than XML, so in some instances JSON is a better choice than XML IMO.

depending on what the goals are sure