[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Andrew Poulos

9/2/2014 4:35:00 AM

I'm currently looking into an elearning "standard" called Tin Can (TC).
TC sends "statements" (json) to the learning record store (LRS). I can
follow everything that the sample I downloaded is doing except for one bit.

When the sample gets to an test and the user clicks the Submit button a
statement for each question is POSTed to the LRS within an array. So if
there are 10 questions you get a 11 element array where each element is
json and one element is json describing the test.

The developer tools in Chrome shows the request payload correctly ie
statements for all questions are as expected.

I'm confused. Is a stringified array of objects valid for json:
[
{blah},
{blah},
{blah},
{blah},
{blah},
{blah},
{blah},
{blah},
{blah}
]

Andrew Poulos
2 Answers

Andrew Poulos

9/2/2014 5:39:00 AM

0

On 2/09/2014 2:34 PM, Andrew Poulos wrote:
> I'm currently looking into an elearning "standard" called Tin Can (TC).
> TC sends "statements" (json) to the learning record store (LRS). I can
> follow everything that the sample I downloaded is doing except for one bit.
>
> When the sample gets to an test and the user clicks the Submit button a
> statement for each question is POSTed to the LRS within an array. So if
> there are 10 questions you get a 11 element array where each element is
> json and one element is json describing the test.
>
> The developer tools in Chrome shows the request payload correctly ie
> statements for all questions are as expected.
>
> I'm confused. Is a stringified array of objects valid for json:
> [
> {blah},
> {blah},
> {blah},
> {blah},
> {blah},
> {blah},
> {blah},
> {blah},
> {blah}
> ]

Sorry, Google provided the answer - its valid though a top-level object
is preferred for security reasons.

Andrew Poulos

Denis McMahon

9/2/2014 9:29:00 AM

0

On Tue, 02 Sep 2014 14:34:55 +1000, Andrew Poulos wrote:

> I'm confused. Is a stringified array of objects valid for json:

Looking at the syntax diagrams on json.org, yes.

--
Denis McMahon, denismfmcmahon@gmail.com