-
-
Save jboonstra/301814 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// option 1 - "versions" key points to an array | |
{"versions": | |
[ | |
{"version":{"id":...}}, | |
{"version":{"id":...}}, | |
] | |
} | |
// option 2 - "version" key points to an array | |
{"versions": | |
{ | |
"version": | |
[{"id":...}] | |
[{"id":...}] | |
} | |
} | |
// option 3 - "versions" key points to an array | |
{"versions": | |
[ | |
{"id":...}, | |
{"id":...} | |
] | |
} | |
// option 4 - "versions" key points to a hash | |
{"versions": | |
{ | |
"version_123":{"id":...}, | |
"version_234":{"id":...}, | |
"version_345":{"id":...} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// option 3, in PHP format - 'versions' key points to an array of arrays | |
$versions = array( | |
array('id' => 1, /*...*/), | |
array('id' => 2, /*...*/), | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment