The reason for nesting them is that there maybe subvalues or text marks or
item marks. That way the syntax of using them does not have to change in
JavaScript except to add another array position.
Regards,
Doug
www.u2logic.com
Makers of the 3 click resizer
George,
Individual MV's are pretty simple, but associated MV's can get interesting:
{
idCode: 178,
cusName: U2Logic,
contacts: [
{
name: David Aitken,
cellPhone: 303-555-1234
},
{
name: Doug Averch,
cellPhone:
And those kinds of relationships (as Rex pointed out) can be a beautiful
thing.
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users
If I have the following dynamic array: TEST
1this
2is
3a
4mv ] test
field 1 = part1
field2 = part2
field3 = part3
field4 = part4
I could make XML as
TEST
part1this/part1
part2is/part2
part3a/part3
part4 vm=1mv/part4
part4 vm=2test/part4
/TEST
I'm confused on how this serializes
Att 4 can be encoded on its own and stored within the parent Jon record. I
am on my phone so pls don't make me key data structures. B-)
On Jul 14, 2011 5:32 PM, George Gallen ggal...@wyanokegroup.com wrote:
If I have the following dynamic array: TEST
1this
2is
3a
4mv ] test
field 1 =
Doh. Autocorrect got me. I meant json record.
Take a look at json.org
That XML example is but one may to model that record.
On Jul 14, 2011 5:36 PM, Steve Romanow slestak...@gmail.com wrote:
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
George:
We have been using JSON for many years now with our Web integration on
Universe and Unidata. This is how your JSON string could look:
{TEST : {
part1 : this,
part2 : is,
part3 : a,
part4 : [mv],[test]
}}
Regards,
Doug
www.u2logic.com
U2WebLink middleware for U2
On Thu,
At the risk of correcting Doug, if this is your input:
TEST
part1this/part1
part2is/part2
part3a/part3
part4 vm=1mv/part4
part4 vm=2test/part4
/TEST
...in JSON there could be represented a few different ways. It could be as
simple as:
[this,is,a,[mv,test]]
Or as complex as:
Hi Kevin:
I could not get you code to validate, see: http://jsonlint.com/, nor could I
get my suggestion to validate either.
Here is some real code read for Universe and this does validate. The
Contact Name is multivalued attribute.
[{IdCode:178,CusName:U2Logic,ContactName:[[David
Ah drat, I knew I should have validated before posting. That's what
confidence'll get ya.. :)
The first one was valid. The second is missing a } at the end, and the
third one should have ended in }}} instead of ]}.
Regarding this:
[{IdCode:178,CusName:U2Logic,ContactName:[[David
I can't see a reason for the nested arrays either. This validates just
fine:
[
{
IdCode: 178,
CusName: U2Logic,
ContactName: [
David Aitken,
Doug Averch,
Ed Karlo
]
}
]
On Thu, Jul 14, 2011 at 9:28 PM, Kevin King
...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
Sent: Monday, December 13, 2010 4:10 PM
To: U2 Users List
Subject: Re: [U2] JSON Parsing
Yes, on the BASIC side. You use CHANGE in BASIC to convert a
multidimensional JSON object to a dynamic array? Okay, you have my
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kevin King
Sent: Monday, December 13, 2010 4:10 PM
To: U2 Users List
Subject: Re: [U2] JSON Parsing
Yes, on the BASIC side. You use CHANGE in BASIC to convert a
multidimensional JSON object to a dynamic array? Okay, you have my
...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Rob Sobers
Sent: Tuesday, December 14, 2010 11:45 AM
To: U2 Users List
Subject: Re: [U2] JSON Parsing
Hi Doug,
So you do the conversion from JSON to U2 Dynamic Array *before* you hit the
database layer (i.e
I forgot to say the @ symbol was for demonstration purposes only...
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Doug
Sent: Tuesday, December 14, 2010 1:39 PM
To: 'U2 Users List'
Subject: Re: [U2] JSON Parsing
Hi
December 2010 20:39
To: 'U2 Users List'
Subject: Re: [U2] JSON Parsing
Hi Rob:
I do not use anything more than Sub-values on the Web. It just get to
complicated. However, I have an idea that might work for those that love
the @IM and @TM.
Here is an example from the Wikipedia page modified
From: Rob Sobers
How do you handle JSON strings that have
more depth than sub-values can accommodate?
PMJI - On one hand I'll say I believe it's not appropriate to
approach storage of N-level structures in a 4-level MV structure
(item,atb,val,sv). This is the first thing people did when
I assume Kevin you are talking about on the UniBasic side because on
JavaScript or Java this is simple array processing. My routine I built over
6 years ago handles hundreds of thousands of transactions a hour with no
problem. I just use the CHANGE function to convert it to a dynamic array.
Yes, on the BASIC side. You use CHANGE in BASIC to convert a
multidimensional JSON object to a dynamic array? Okay, you have my
attention... do tell please.
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
19 matches
Mail list logo