[plugin] JSON (import/export/generate/edit/inspect/...)

Post your completed addons to share with the community

Post » Thu Feb 08, 2018 9:04 am

Yann wrote:And I just noticed this plugin is still in the "Work in Progress Addons" section...
I think it's stable enough to be promoted to the "Completed Addons" section.
What d'ya think?


Moved, per request.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
144
S
33
G
89
Posts: 5,905
Reputation: 62,558

Post » Thu Feb 08, 2018 8:27 pm

@zenox98
4 years of dev, this plugins is AAA :D
B
71
S
22
G
14
Posts: 1,494
Reputation: 16,660

Post » Sat Mar 31, 2018 1:27 am

Hey;
I have a question. I try to reach ,"name":"KAFE", on this json;

Code: Select all
{"meta":{"code":200,"requestId":"asdasdasd"},"response":{"cafes":[{"id":"222sssaaa","name":"KAFE","contact":{"twitter":"kafe","instagram":"kafe","facebook":"213","facebookUsername":"kafe","facebookName":"kafe"},"location":{....................................

EDİT : Resolved.
B
8
S
3
Posts: 4
Reputation: 667

Post » Thu Apr 05, 2018 9:29 am

@Yann or anyone else...
I am trying to understand this plugin but im lost... :(

I need to set data from this json: https://api.ipdata.co/ into my global variables. Is there any capx example on how to do this?
lets say i want to set latitude to mine LAT variable.... how to do this?

Thanx!
B
37
S
16
G
3
Posts: 858
Reputation: 6,744

Post » Sat Apr 07, 2018 6:17 am

@irina
there

if you are curious about the 0 in JSON.Value(0,"latitude") it means "from the root" of the object, as opposed to 1 which would mean "from current path" (used for loops and recursion)
B
71
S
22
G
14
Posts: 1,494
Reputation: 16,660

Post » Sun Apr 08, 2018 9:01 am

Thanx!
B
37
S
16
G
3
Posts: 858
Reputation: 6,744

Post » Mon Apr 16, 2018 6:50 am

I'm trying to get json from my url, but cant load to AJAX.LastData
If i see your template is fine and work with your url but not for me


here my capx https://drive.google.com/open?id=17VALJNbzh_RxBUGIa_1bj4NluT-1kpPs

do i make a mistake on capx or json file?

btw, json file is generated from php (get data from database mysql).
B
29
S
10
G
184
Posts: 12
Reputation: 93,685

Post » Tue Apr 17, 2018 4:24 pm

@marmis
I can't access http://assets.marmisdev.win/result.json so I can't be sure but if I had to guess, you might not have sent proper headers from your server.

in php you could try that (before any output)
Code: Select all
 header("Access-Control-Allow-Origin: *");
B
71
S
22
G
14
Posts: 1,494
Reputation: 16,660

Post » Wed Apr 18, 2018 3:23 am

sorry, move to http://tester.marmisdev.win/result.json

I can access the url with enable CORS plugin on firefox.


Yann wrote:@marmis
I can't access http://assets.marmisdev.win/result.json so I can't be sure but if I had to guess, you might not have sent proper headers from your server.

in php you could try that (before any output)
Code: Select all
 header("Access-Control-Allow-Origin: *");


I've also placed at the beginning of the .php file but still can't.
B
29
S
10
G
184
Posts: 12
Reputation: 93,685

Post » Wed Apr 18, 2018 10:33 pm

@marmis
from https://api.ipdata.co/
it works
Image


now using http://tester.marmisdev.win/result.json
Image
you can easily see that you don't send the proper cors header, and that's what construct is complaining about
Image
B
71
S
22
G
14
Posts: 1,494
Reputation: 16,660

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 0 guests