Search found 13 matches
- Wed Mar 07, 2018 4:58 am
- Forum: LEGACY scripting
- Topic: Using variables in script to create Json - Newbie help
- Replies: 27
- Views: 27870
Re: Using variables in script to create Json - Newbie help
Thanks Jan I'll continue to test. IN first instance it is giving me the same errors as a above but I'll try start through elimination again.
- Tue Mar 06, 2018 4:44 am
- Forum: LEGACY scripting
- Topic: Using variables in script to create Json - Newbie help
- Replies: 27
- Views: 27870
Re: Using variables in script to create Json - Newbie help
Hi Jan,
Have you had any luck with this one at all?
Cheers,
Cade
Have you had any luck with this one at all?
Cheers,
Cade
- Tue Feb 20, 2018 2:53 am
- Forum: LEGACY scripting
- Topic: Using variables in script to create Json - Newbie help
- Replies: 27
- Views: 27870
Re: Using variables in script to create Json - Newbie help
So I'm getting an error again when adding another array in, it seems to be working fine in the address area but failing in the below part. If I remove it it's fine and gives the result above but when I add in [] it spits back a "unterminated object" in the debug notes again. Any clues? add...
- Tue Feb 20, 2018 2:07 am
- Forum: LEGACY scripting
- Topic: Using variables in script to create Json - Newbie help
- Replies: 27
- Views: 27870
Re: Using variables in script to create Json - Newbie help
I think I have got it working outside of that, the app didn't like switch adding [X] inside variables to separate data under similar headings from the XML. Any reason why it reverses the JSON? e.g. { "Orders": [{ "UniqueSubmitOrderID": "string", "Status": { &q...
- Mon Feb 19, 2018 3:53 am
- Forum: LEGACY scripting
- Topic: Using variables in script to create Json - Newbie help
- Replies: 27
- Views: 27870
Re: Using variables in script to create Json - Newbie help
There is a problem with the Square brackets [ ] when used in the Make JSON. Switch has a special use of square brackets and that conflicts with JSON's use of square brackets. And just to escape them doesn't solve it. I will create a workaround to solve this problem so that we can have correct JSON ...
- Wed Feb 07, 2018 8:41 pm
- Forum: LEGACY scripting
- Topic: Using variables in script to create Json - Newbie help
- Replies: 27
- Views: 27870
Re: Using variables in script to create Json - Newbie help
Thanks for both your help.
- Sun Feb 04, 2018 10:03 pm
- Forum: LEGACY scripting
- Topic: Using variables in script to create Json - Newbie help
- Replies: 27
- Views: 27870
Re: Using variables in script to create Json - Newbie help
Hi Jan, I did that part and the code in the bottom part works perfectly. It only seems to be once I enter a variable in simple JSON below it doesn't like it. e.g. I entered a variable into the ref field and it spits back an error. The code also checks out on the link. { "Items": [{ "S...
- Thu Feb 01, 2018 11:35 pm
- Forum: LEGACY scripting
- Topic: Using variables in script to create Json - Newbie help
- Replies: 27
- Views: 27870
Re: Using variables in script to create Json - Newbie help
I think that you have to take a look at your JSON, if I run this simple JSON with Switch variables as they are it works for me. { "Address": "[Metadata.Text:Path="/order/items/item/extra/Adress",Dataset="Xml",Model="XML"]" } Build it line by line to...
- Wed Jan 31, 2018 12:08 am
- Forum: LEGACY scripting
- Topic: Using variables in script to create Json - Newbie help
- Replies: 27
- Views: 27870
Re: Using variables in script to create Json - Newbie help
Hi, The App uses the internal JSON Parser in Switch and if you get that message it is something that the parser doesn't understand. Check your JSON in one of the online JSON Parsers and you can work out where there is something wrong in your code. I tried this one and it showed errors. http://json....
- Tue Jan 30, 2018 5:00 am
- Forum: LEGACY scripting
- Topic: Using variables in script to create Json - Newbie help
- Replies: 27
- Views: 27870
Re: Using variables in script to create Json - Newbie help
The App is up now, it got delayed due to the holidays Currently there is an error in the Compatibility description of the app. Version 1 of the App works with Switch 13 update 1 but in that case there is no validation of the JSON-code. From version 2017 update 2 you have validation of JSON and vers...
- Sat Jan 06, 2018 12:28 am
- Forum: LEGACY scripting
- Topic: Using variables in script to create Json - Newbie help
- Replies: 27
- Views: 27870
Re: Using variables in script to create Json - Newbie help
great, I'll test it out and see how I get on.
Thanks,
Cade
Thanks,
Cade
- Thu Dec 21, 2017 9:17 pm
- Forum: LEGACY scripting
- Topic: Using variables in script to create Json - Newbie help
- Replies: 27
- Views: 27870
Re: Using variables in script to create Json - Newbie help
Perfect,jan_suhr wrote:I did an app for this, it will be published tomorrow and it is for FREE!!
You can write your own JSON and add Switch variables to it.
It is called "Make JSON"
I'll check out the app and give it a go.
Thanks,
Cade
- Thu Dec 21, 2017 3:14 am
- Forum: LEGACY scripting
- Topic: Using variables in script to create Json - Newbie help
- Replies: 27
- Views: 27870
Using variables in script to create Json - Newbie help
Pretty new to the scripting module but we are trying to pull variables from an XML document then create a json inside a script (it needs to authenticate before pushing into the API) So dropping the XML into a folder and using XML pickup with Metadata as asset. My understanding is that this should sa...