To be honest, no. We hope to move to javascript in the not-too-distant future, making the current macro syntax somewhat of a redheaded stepchild...TK wrote:Makes sense, unfortunately since I'm putting this right in a macro link so building it up like that would be very difficult. Is there any plan to add in escape characters as a feature in future builds?Craig wrote:So what you have to do is build the objects in pieces.
Understanding JSON objects and arrays in MT macros.
Moderators: dorpond, trevor, Azhrei
Re: Understanding JSON objects and arrays in MT macros.
- Veggiesama
- Dragon
- Posts: 619
- Joined: Wed Aug 29, 2007 1:18 am
Re: Understanding JSON objects and arrays in MT macros.
I have been doing a poor man's hack. If I need to deal with an apostrophe character in a JSON in a context that doesn't like apostrophes, I do replace(json, "'", "`") and then the reverse when I store the JSON again.TK wrote:Did some searching, my apologies if this is answered somewhere already.
Is there a way to escape the apostrophe ' character in a JSON object? I will likely need to escape the quote " character at some point too if possible.
Thanks
I replace a single-quote with back-quote (that key to the left of 1) because generally people don't use back-quotes for anything.
My D&D 4e Campaign Framework — My Shadowrun 4e Campaign Framework
RPGA#: 5223846427 — Skype: Veggiesama — Fear the ferret.
RPGA#: 5223846427 — Skype: Veggiesama — Fear the ferret.
Re: Understanding JSON objects and arrays in MT macros.
Heh, you're showing your U.S. bias by just assuming that the backtic is there.Veggiesama wrote:I replace a single-quote with back-quote (that key to the left of 1) because generally people don't use back-quotes for anything.
- Veggiesama
- Dragon
- Posts: 619
- Joined: Wed Aug 29, 2007 1:18 am
Re: Understanding JSON objects and arrays in MT macros.
That's 'cuz I don't use no durn commie finger-punchin' board. I only use true red, white, and blue 'Merican English keyboards!Azhrei wrote:Heh, you're showing your U.S. bias by just assuming that the backtic is there.
(made in Thailand)
My D&D 4e Campaign Framework — My Shadowrun 4e Campaign Framework
RPGA#: 5223846427 — Skype: Veggiesama — Fear the ferret.
RPGA#: 5223846427 — Skype: Veggiesama — Fear the ferret.