Hi - I'm using [jsonstore] a=nd it's great to have it.=C2=A0 It's not a flexible as [xmlparse] t=hough.
So if I want to pull out the error message =from a Stripe.com json response I have to do the following:
<=/div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 [table na=me=3DtabJSONPARSE&fields=3DtID,error:type,error:message][/tab=le][!]
[/!][jsonstore table=3DtabJS=ONPARSE][varSTRIPERESPONSE][/jsonstore][!]
[/!][search table=3DtabJSONPARSE&netIDdatarq=3D=find_all][founditems][!]
[/!]=[text]error:type=3D[error:type][/text][!]
[/!][text]error:message=3D[error:message][/text][!]
=
[/!][/founditems][/search]
Only then can I access the variable [error:message].=C2=A0 I al=so need to know the exact structure of the incoming JSON response so I can =set up the table correctly.
If we had similar func=tionality to [xmlparse] then I could do something like:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[jsonparse var==3Djson_var1][varSTRIPERESPONSE][/jsonparse]
=C2=A0 =C2=A0 ==C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[jsonnode ref=3Djson_var1&path==3Dnamed:error:message][value][/jsonnode]
It w=ould also be great to be able to traverse the JSON response, particularly i=f we are not sure about the structure of the incoming JSON
=div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[jsonnodes =ref=3Djson_var1]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0[name]=3D[value]
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[/jsonnodes]
- Tom
=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D
Digital Revolutionaries
1st Floor, Castleriv=er House
14-15 Parliament Street
Temple Bar,Dublin 2
Ireland
--=--------------------------------------------
[t]: + 353 1 4403907=a>
[e]: <mailto:tom@revolutionaries.ie>
[w]: <http://www.revolutionaries.ie=/>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3DOn 3 March 2017 at 15:27,
<c=hristophe.billiottet@webdna.us> wrote:
Hi Tom! WebDNA already includes a JSON parser, that takes any JSON Objec=t, parse and store it: it will automatically create the database if it does= not exist, create the fields and populate it.
http://www.webdna.us/page.dna?numero=3D307
From this, it is easy to use the data by treating the database (or table) l=ike any other WebDNA database.
best regards,
- chris
> On Mar 3, 2017, at 15:57, Tom Duke <
tom@revolutionaries.ie> wrote:
>
> Chris,
>
> Hi - great to hear that you are working on this.
>
> The features that I would love to see are:
>
>
> [json_encode]{data}[/json_enco
de]
>
> It would operate the same as the matching PHP function: http://www.php.net/manual/en/function.json-encode.php
>
> So the data would be a WebDNA array and/or perhaps name/value pairs se=parated by line returns. Nested JSON would require some thought, some ideas= here: http://stackoverf=low.com/questions/15810257/create-nested-json-object-in-php>
>
> [json_parse]{data}[/json_parse]
>
> It would operate in a similar way to [xmlparse] allowing us to travers=e and extract the JSON data by node.=C2=A0 Also similar to the PHP json_dec=ode function: http://www.php.net/manual/en/function.json-decode.php
>
>
>
> - Tom
>
>
>
>
>
>
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<=br>> Digital Revolutionaries
> 1st Floor, Castleriver House
> 14-15 Parliament Street
> Temple Bar,Dublin 2
> Ireland
> ----------------------------------------------
> [t]: + 353 1 4403907
> [e]: <mailto:tom@revolutionaries.ie>
> [w]: <http://www.revolutionaries.ie/>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<=br>>
> On 27 February 2017 at 14:24, <christophe.billiottet@webdna.us&g=t; wrote:
> Hello,
>
> we are interested to expand and develop the JSON capabilities and comp=atibility of WebDNA, particularly treating JSON-formatted returns from java=script as well as submitting JSON-formatted info to external programs and a=pplications.
>
> If you have any related ideas, we are listening! :-)
>
> - chris---------------------------------------------------------
> This message is sent to you because you are subscribed to
> the mailing list <talk@webdna.us>.
> To unsubscribe, E-mail to: <talk-leave@webdna.us>
> archives: http://mail.webdna.us/list/talk@webdna.=us
> Bug Reporting: =support@webdna.us
>
> -----------------------------------------------------=---- This message is sent to you because you are subscribed to the mailing =list . To unsubscribe, E-mail to: archives: http://mail.web=dna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list
.To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us--94eb2c07b178b5e0b50549e8113e--.
Associated Messages, from the most recent to the oldest:
1034--94eb2c07b178b5e0b50549e8113eContent-Type: text/plain; charset=UTF-8Chris,Hi - I'm using [JSONstore] and it's great to have it. It's not a flexibleas [xmlparse] though.So if I want to pull out the error message from a Stripe.com json responseI have to do the following: [table name=tabJSONPARSE&fields=tID,error:type,error:message][/table][!][/!][jsonstore table=tabJSONPARSE][varSTRIPERESPONSE][/jsonstore][!][/!][search table=tabJSONPARSE&netIDdatarq=find_all][founditems][!][/!][text]error:type=[error:type][/text][!][/!][text]error:message=[error:message][/text][!][/!][/founditems][/search]Only then can I access the variable [error:message]. I also need to knowthe exact structure of the incoming JSON response so I can set up the tablecorrectly.If we had similar functionality to [xmlparse] then I could do somethinglike: [jsonparse var=json_var1][varSTRIPERESPONSE][/jsonparse] [jsonnoderef=json_var1&path=named:error:message][value][/jsonnode]It would also be great to be able to traverse the JSON response,particularly if we are not sure about the structure of the incoming JSON [jsonnodes ref=json_var1] [name]=[value] [/jsonnodes]- Tom==============================================Digital Revolutionaries1st Floor, Castleriver House14-15 Parliament StreetTemple Bar,Dublin 2Ireland----------------------------------------------[t]: + 353 1 4403907 <(01)%20440%203907>[e]: [w]: ==============================================On 3 March 2017 at 15:27, wrote:> Hi Tom! WebDNA already includes a JSON parser, that takes any JSON Object,> parse and store it: it will automatically create the database if it does> not exist, create the fields and populate it.>> http://www.webdna.us/page.dna?numero=307>> From this, it is easy to use the data by treating the database (or table)> like any other WebDNA database.>> best regards,>> - chris>>>> > On Mar 3, 2017, at 15:57, Tom Duke wrote:> >> > Chris,> >> > Hi - great to hear that you are working on this.> >> > The features that I would love to see are:> >> >> > [json_encode]{data}[/json_encode]> >> > It would operate the same as the matching PHP function:> http://www.php.net/manual/en/function.json-encode.php> >> > So the data would be a WebDNA array and/or perhaps name/value pairs> separated by line returns. Nested JSON would require some thought, some> ideas here: http://stackoverflow.com/questions/15810257/create-nested-> json-object-in-php> >> >> > [json_parse]{data}[/json_parse]> >> > It would operate in a similar way to [xmlparse] allowing us to traverse> and extract the JSON data by node. Also similar to the PHP json_decode> function: http://www.php.net/manual/en/function.json-decode.php> >> >> >> > - Tom> >> >> >> >> >> >> >> > ==============================================> > Digital Revolutionaries> > 1st Floor, Castleriver House> > 14-15 Parliament Street> > Temple Bar,Dublin 2> > Ireland> > ----------------------------------------------> > [t]: + 353 1 4403907> > [e]: > > [w]: > > ==============================================> >> > On 27 February 2017 at 14:24, wrote:> > Hello,> >> > we are interested to expand and develop the JSON capabilities and> compatibility of WebDNA, particularly treating JSON-formatted returns from> javascript as well as submitting JSON-formatted info to external programs> and applications.> >> > If you have any related ideas, we are listening! :-)> >> > - chris---------------------------------------------------------> > This message is sent to you because you are subscribed to> > the mailing list .> > To unsubscribe, E-mail to: > > archives: http://mail.webdna.us/list/talk@webdna.us> > Bug Reporting: support@webdna.us> >> > --------------------------------------------------------- This message> is sent to you because you are subscribed to the mailing list . To> unsubscribe, E-mail to: archives: http://mail.webdna.us/list/tal> k@webdna.us Bug Reporting: support@webdna.us>> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us>--94eb2c07b178b5e0b50549e8113eContent-Type: text/html; charset=UTF-8Content-Transfer-Encoding: quoted-printableChris,
So if I want to pull out the error message =from a Stripe.com json response I have to do the following:
<=/div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 [table na=me=3DtabJSONPARSE&fields=3DtID,
error:type,error:message][/tab=le][!][/!][jsonstore table=3DtabJS=ONPARSE][
varSTRIPERESPONSE][/jsonstore][!][/!][search table=3DtabJSONPARSE&
netIDdatarq=3D=find_all][founditems][!][/!]=
[text]error:type=3D[error:
type][/text][!][/!]
[text]error:message=3D[
error:message][/text][!]=
[/!][/founditems][/search]
Only then can I access the variable [error:message].=C2=A0 I al=so need to know the exact structure of the incoming JSON response so I can =set up the table correctly.
If we had similar func=tionality to
[xmlparse] then I could do something like:
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[jsonparse var==3Djson_var1][varSTRIPERESPONSE][/jsonparse]
=C2=A0 =C2=A0 ==C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[jsonnode ref=3Djson_var1&path==3Dnamed:error:message][value][/jsonnode]
It w=ould also be great to be able to traverse the JSON response, particularly i=f we are not sure about the structure of the incoming JSON
=div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[jsonnodes =ref=3Djson_var1]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0[name]=3D[value]
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[/jsonnodes]
- Tom
=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D
Digital Revolutionaries
1st Floor, Castleriv=er House
14-15 Parliament Street
Temple Bar,Dublin 2
Ireland
--=--------------------------------------------
[t]: + 353 1 4403907=a>
[e]: <mailto:tom@revolutionaries.ie>
[w]: <http://www.revolutionaries.ie=/>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3DOn 3 March 2017 at 15:27,
<c=hristophe.billiottet@webdna.us> wrote:
Hi Tom! WebDNA already includes a JSON parser, that takes any JSON Objec=t, parse and store it: it will automatically create the database if it does= not exist, create the fields and populate it.
http://www.webdna.us/page.dna?numero=3D307
From this, it is easy to use the data by treating the database (or table) l=ike any other WebDNA database.
best regards,
- chris
> On Mar 3, 2017, at 15:57, Tom Duke <
tom@revolutionaries.ie> wrote:
>
> Chris,
>
> Hi - great to hear that you are working on this.
>
> The features that I would love to see are:
>
>
> [json_encode]{data}[/json_enco
de]
>
> It would operate the same as the matching PHP function: http://www.php.net/manual/en/function.json-encode.php
>
> So the data would be a WebDNA array and/or perhaps name/value pairs se=parated by line returns. Nested JSON would require some thought, some ideas= here: http://stackoverf=low.com/questions/15810257/create-nested-json-object-in-php>
>
> [json_parse]{data}[/json_parse]
>
> It would operate in a similar way to [xmlparse] allowing us to travers=e and extract the JSON data by node.=C2=A0 Also similar to the PHP json_dec=ode function: http://www.php.net/manual/en/function.json-decode.php
>
>
>
> - Tom
>
>
>
>
>
>
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<=br>> Digital Revolutionaries
> 1st Floor, Castleriver House
> 14-15 Parliament Street
> Temple Bar,Dublin 2
> Ireland
> ----------------------------------------------
> [t]: + 353 1 4403907
> [e]: <mailto:tom@revolutionaries.ie>
> [w]: <http://www.revolutionaries.ie/>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D==3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<=br>>
> On 27 February 2017 at 14:24, <christophe.billiottet@webdna.us&g=t; wrote:
> Hello,
>
> we are interested to expand and develop the JSON capabilities and comp=atibility of WebDNA, particularly treating JSON-formatted returns from java=script as well as submitting JSON-formatted info to external programs and a=pplications.
>
> If you have any related ideas, we are listening! :-)
>
> - chris---------------------------------------------------------
> This message is sent to you because you are subscribed to
> the mailing list <talk@webdna.us>.
> To unsubscribe, E-mail to: <talk-leave@webdna.us>
> archives: http://mail.webdna.us/list/talk@webdna.=us
> Bug Reporting: =support@webdna.us
>
> -----------------------------------------------------=---- This message is sent to you because you are subscribed to the mailing =list . To unsubscribe, E-mail to: archives: http://mail.web=dna.us/list/talk@webdna.us Bug Reporting: support@webdna.us
---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list
.To unsubscribe, E-mail to: archives: http://mail.webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us--94eb2c07b178b5e0b50549e8113e--.
Tom Duke
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Showif, Hideif reverse logic ? (1997)
Searching for a space (2000)
WebCat2: Items xx to xx shown, etc. (1997)
Still Stumped on ShowNext...HELP! (1997)
Problems with sql: "not supported" (2005)
Emailer help....! (1997)
restart needed???? (1997)
more [sendmail] woes.. (2000)
orders (1998)
final on include (1997)
WebCatalog NT beta 18 now available (1997)
[FoundItems] solved - thanks (1997)
Software & Sites (1998)
Multi-processor Mac info ... (1997)
Include a big block of text (1997)
includes and cart numbers (1997)
taxTotal, grandTotal (1997)
OPEN MARKET PATENTS SOUND ECOMMERCE ALARM (1998)
Separating My File Field (2004)
Separate SSL Server (1997)