Menu

#33 JSON plutôt que XML pour les data de la game ?

accepted
None
SPECS
2014-04-24
2011-04-08
No

Je reviens sur la ce point qui n'a pas été vraiment répondu (ou alors j'ai zappé comme pas mal d'autres points...)

Qu'est-ce qui est le mieux entre :

{ "questions" : [ { "goodchoice" : 2, "label" : "Question1", "choices" : [ "choix1", "choix2", "choix3", "choix4" ] }, { "goodchoice" : 2, "label" : "Question2", "choices" : [ "choix1", "choix2", "choix3", "choix4" ] }, { "goodchoice" : 2, "label" : "Question3", "choices" : [ "choix1", "choix2", "choix3", "choix4" ] }, { "goodchoice" : 4, "label" : "Question4", "choices" : [ "choix1", "choix2", "choix3", "choix4" ] }, { "goodchoice" : 1, "label" : "Question5", "choices" : [ "choix1", "choix2", "choix3", "choix4" ] }, { "goodchoice" : 2, "label" : "Question6", "choices" : [ "choix1", "choix2", "choix3", "choix4" ] }, { "goodchoice" : 3, "label" : "Question7", "choices" : [ "choix1", "choix2", "choix3", "choix4" ] }, { "goodchoice" : 1, "label" : "Question8", "choices" : [ "choix1", "choix2", "choix3", "choix4" ] }, { "goodchoice" : 4, "label" : "Question9", "choices" : [ "choix1", "choix2", "choix3", "choix4" ] }, { "goodchoice" : 2, "label" : "Question10", "choices" : [ "choix1", "choix2", "choix3", "choix4" ] }, { "goodchoice" : 1, "label" : "Question11", "choices" : [ "choix1", "choix2", "choix3", "choix4" ] }, { "goodchoice" : 3, "label" : "Question12", "choices" : [ "choix1", "choix2", "choix3", "choix4" ] }, { "goodchoice" : 4, "label" : "Question13", "choices" : [ "choix1", "choix2", "choix3", "choix4" ] }, { "goodchoice" : 1, "label" : "Question14", "choices" : [ "choix1", "choix2", "choix3", "choix4" ] }, { "goodchoice" : 1, "label" : "Question15", "choices" : [ "choix1", "choix2", "choix3", "choix4" ] }, { "goodchoice" : 1, "label" : "Question16", "choices" : [ "choix1", "choix2", "choix3", "choix4" ] }, { "goodchoice" : 2, "label" : "Question17", "choices" : [ "choix1", "choix2", "choix3", "choix4" ] }, { "goodchoice" : 2, "label" : "Question18", "choices" : [ "choix1", "choix2", "choix3", "choix4" ] }, { "goodchoice" : 1, "label" : "Question19", "choices" : [ "choix1", "choix2", "choix3", "choix4" ] }, { "goodchoice" : 3, "label" : "Question20", "choices" : [ "choix1", "choix2", "choix3", "choix4" ] } ], "parameters" : { "logintimeout" : 20, "synchrotime" : 3, "nbusersthreshold" : 1000000, "questiontimeframe" : 5, "flushusertable" : tre, "trackeduseridmail" : "unused" } }

et

<?xml version="1.0" encoding="UTF-8"?><usi:gamesession xmlns:usi="http://www.usi.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.usi.com gamesession.xsd "> <usi:questions> <usi:question goodchoice="1"> <usi:label>This the quesion 1.</usi:label> <usi:choice>Choix 1</usi:choice> <usi:choice>Choix 2</usi:choice> <usi:choice>Choix 3</usi:choice> <usi:choice>Choix 4</usi:choice> </usi:question> <usi:question goodchoice="1"> <usi:label>This the quesion 2.</usi:label> <usi:choice>Choix 1</usi:choice> <usi:choice>Choix 2</usi:choice> <usi:choice>Choix 3</usi:choice> <usi:choice>Choix 4</usi:choice> </usi:question> <usi:question goodchoice="2"> <usi:label>This the quesion 3.</usi:label> <usi:choice>Choix 1</usi:choice> <usi:choice>Choix 2</usi:choice> <usi:choice>Choix 3</usi:choice> <usi:choice>Choix 4</usi:choice> </usi:question> <usi:question goodchoice="2"> <usi:label>This the quesion 4.</usi:label> <usi:choice>Choix 1</usi:choice> <usi:choice>Choix 2</usi:choice> <usi:choice>Choix 3</usi:choice> <usi:choice>Choix 4</usi:choice> </usi:question> <usi:question goodchoice="3"> <usi:label>This the quesion 5.</usi:label> <usi:choice>Choix 1</usi:choice> <usi:choice>Choix 2</usi:choice> <usi:choice>Choix 3</usi:choice> <usi:choice>Choix 4</usi:choice> </usi:question> <usi:question goodchoice="3"> <usi:label>This the quesion 6.</usi:label> <usi:choice>Choix 1</usi:choice> <usi:choice>Choix 2</usi:choice> <usi:choice>Choix 3</usi:choice> <usi:choice>Choix 4</usi:choice> </usi:question> <usi:question goodchoice="4"> <usi:label>This the quesion 7.</usi:label> <usi:choice>Choix 1</usi:choice> <usi:choice>Choix 2</usi:choice> <usi:choice>Choix 3</usi:choice> <usi:choice>Choix 4</usi:choice> </usi:question> <usi:question goodchoice="4"> <usi:label>This the quesion 8.</usi:label> <usi:choice>Choix 1</usi:choice> <usi:choice>Choix 2</usi:choice> <usi:choice>Choix 3</usi:choice> <usi:choice>Choix 4</usi:choice> </usi:question> <usi:question goodchoice="4"> <usi:label>This the quesion 9.</usi:label> <usi:choice>Choix 1</usi:choice> <usi:choice>Choix 2</usi:choice> <usi:choice>Choix 3</usi:choice> <usi:choice>Choix 4</usi:choice> </usi:question> <usi:question goodchoice="4"> <usi:label>This the quesion 10.</usi:label> <usi:choice>Choix 1</usi:choice> <usi:choice>Choix 2</usi:choice> <usi:choice>Choix 3</usi:choice> <usi:choice>Choix 4</usi:choice> </usi:question> <usi:question goodchoice="3"> <usi:label>This the quesion 11.</usi:label> <usi:choice>Choix 1</usi:choice> <usi:choice>Choix 2</usi:choice> <usi:choice>Choix 3</usi:choice> <usi:choice>Choix 4</usi:choice> </usi:question> <usi:question goodchoice="3"> <usi:label>This the quesion 12.</usi:label> <usi:choice>Choix 1</usi:choice> <usi:choice>Choix 2</usi:choice> <usi:choice>Choix 3</usi:choice> <usi:choice>Choix 4</usi:choice> </usi:question> <usi:question goodchoice="2"> <usi:label>This the quesion 13.</usi:label> <usi:choice>Choix 1</usi:choice> <usi:choice>Choix 2</usi:choice> <usi:choice>Choix 3</usi:choice> <usi:choice>Choix 4</usi:choice> </usi:question> <usi:question goodchoice="2"> <usi:label>This the quesion 14.</usi:label> <usi:choice>Choix 1</usi:choice> <usi:choice>Choix 2</usi:choice> <usi:choice>Choix 3</usi:choice> <usi:choice>Choix 4</usi:choice> </usi:question> <usi:question goodchoice="1"> <usi:label>This the quesion 15.</usi:label> <usi:choice>Choix 1</usi:choice> <usi:choice>Choix 2</usi:choice> <usi:choice>Choix 3</usi:choice> <usi:choice>Choix 4</usi:choice> </usi:question> <usi:question goodchoice="1"> <usi:label>This the quesion 16.</usi:label> <usi:choice>Choix 1</usi:choice> <usi:choice>Choix 2</usi:choice> <usi:choice>Choix 3</usi:choice> <usi:choice>Choix 4</usi:choice> </usi:question> <usi:question goodchoice="1"> <usi:label>This the quesion 17.</usi:label> <usi:choice>Choix 1</usi:choice> <usi:choice>Choix 2</usi:choice> <usi:choice>Choix 3</usi:choice> <usi:choice>Choix 4</usi:choice> </usi:question> <usi:question goodchoice="1"> <usi:label>This the quesion 18.</usi:label> <usi:choice>Choix 1</usi:choice> <usi:choice>Choix 2</usi:choice> <usi:choice>Choix 3</usi:choice> <usi:choice>Choix 4</usi:choice> </usi:question> <usi:question goodchoice="2"> <usi:label>This the quesion 19.</usi:label> <usi:choice>Choix 1</usi:choice> <usi:choice>Choix 2</usi:choice> <usi:choice>Choix 3</usi:choice> <usi:choice>Choix 4</usi:choice> </usi:question> <usi:question goodchoice="2"> <usi:label>This the quesion 20.</usi:label> <usi:choice>Choix 1</usi:choice> <usi:choice>Choix 2</usi:choice> <usi:choice>Choix 3</usi:choice> <usi:choice>Choix 4</usi:choice> </usi:question> </usi:questions> <usi:parameters> <usi:logintimeout>20</usi:logintimeout> <usi:synchrotime>3</usi:synchrotime> <usi:nbusersthreshold>1000000</usi:nbusersthreshold> <usi:questiontimeframe>5</usi:questiontimeframe> <usi:nbquestions>20</usi:nbquestions> <usi:flushusertable>false</usi:flushusertable> <usi:trackeduseridmail>usi:trackeduseridmail</usi:trackeduseridmail> </usi:parameters></usi:gamesession>

Y'a pas vraiment photo, ca ne serait vraiment pas beaucoup de boulot de modifier l'injecteur pour envoyer du JSON plutôt que du XML.

Mais bon les clients sont rois comme on dit...

Discussion

Anonymous
Anonymous

Add attachments
Cancel