Revision 27a44b5e
Added by Leszek Koltunski over 1 year ago
src/main/java/org/distorted/objectlib/json/JsonReader.java | ||
---|---|---|
611 | 611 |
JSONObject object = new JSONObject(contentsString); |
612 | 612 |
int major = object.getInt("major"); |
613 | 613 |
|
614 |
if( major==JsonWriter.VERSION_OBJECT_MAJOR )
|
|
614 |
if( major>=6 )
|
|
615 | 615 |
{ |
616 | 616 |
parseFile(object); |
617 | 617 |
} |
... | ... | |
636 | 636 |
JSONObject object = new JSONObject(contents.toString()); |
637 | 637 |
int major = object.getInt("major"); |
638 | 638 |
|
639 |
if( major==JsonWriter.VERSION_OBJECT_MAJOR )
|
|
639 |
if( major>=6 )
|
|
640 | 640 |
{ |
641 | 641 |
JSONObject metadata = object.getJSONObject("metadata"); |
642 | 642 |
parseMetadata(metadata); |
... | ... | |
685 | 685 |
JSONObject object = new JSONObject(contents.toString()); |
686 | 686 |
int major = object.getInt("major"); |
687 | 687 |
|
688 |
if( major==JsonWriter.VERSION_EXTRAS_MAJOR )
|
|
688 |
if( major==1 )
|
|
689 | 689 |
{ |
690 | 690 |
parseTutorial(object); |
691 | 691 |
} |
Also available in: Unified diff
We need to support reading from earlier JSONs. Support v. 6 (partially - only the objects which do not have the new in v. 7 algorithms & edges - i.e. locally created bandaged cuboids)