[plugin] rex_json_builder, rex_XMLWriter

Post your work in progress addons and get feedback

Post » Thu Apr 28, 2016 2:46 am

@mfdeveloper

"this.current_object" is null while adding key-value directly without putting it into a dictionary or an array (sample capx). I should raise an error message to notify user.
So adding a condition to exclude this javascript exception is not a good idea.


Edit:
Is it JSON v1.1?
B
107
S
25
G
231
Posts: 4,362
Reputation: 131,414

Post » Thu Apr 28, 2016 7:47 pm

@rexrainbow, I understand now. So, if this is your purpose, Do you not should throw a specific exception? The javascript undefined error is generic for me. In my case, I inserted the initial value like a Dictionary with a empty key, and the same error happens. But, one different thing, is that I don't create the "On Start Layout" event, it is needed?

Thank you so much for your attention!
B
3
Posts: 4
Reputation: 183

Post » Thu Mar 09, 2017 10:20 am

Thanks for your works Rex

It's about the plugin Rex - Data structure - JSON / JSON

I tried to insert or push value, keystring is ok, but the value is empty

Image

Image

https://dl.dropboxusercontent.com/u/157080199/test_c2/JSON_Insert.capx
B
18
S
4
Posts: 83
Reputation: 2,073

Post » Thu Mar 09, 2017 3:58 pm

@amkp

Bug fixed, please download rex_hash plugin again.
B
107
S
25
G
231
Posts: 4,362
Reputation: 131,414

Post » Fri Mar 10, 2017 9:05 am

Thanks

Is it normal the hook ?

Image
B
18
S
4
Posts: 83
Reputation: 2,073

Post » Fri Mar 10, 2017 9:26 am

@amkp

Sorry, what is "hook"?
The json data looks correctlty.
B
107
S
25
G
231
Posts: 4,362
Reputation: 131,414

Post » Fri Mar 10, 2017 9:30 am

Habitually, basic json format is like { "mykey" : "myvalue" } not { "mykey" : ["myvalue"] } no ?
B
18
S
4
Posts: 83
Reputation: 2,073

Post » Fri Mar 10, 2017 9:57 am

@amkp

Insert "myValue" into array at "myKey"[0]

"myKey"[0] --> Index 0 at Array "myKey". i.e. "myKey" is an array.


Try to use "Action:Set value" to "set value by key"
B
107
S
25
G
231
Posts: 4,362
Reputation: 131,414

Post » Fri Mar 10, 2017 10:01 am

It's ok, I understand my mistake, sorry.
B
18
S
4
Posts: 83
Reputation: 2,073

Previous

Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 0 guests