Skip to content

Commit 9e1df28

Browse files
committed
Fixes #131.
1 parent 5849e96 commit 9e1df28

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

scripts/src/main/javascript/org/hisrc/jsonix/Jsonix/Context.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ Jsonix.Context = Jsonix
253253
*/
254254
builtinTypeInfos : [
255255
Jsonix.Schema.XSD.AnyType.INSTANCE,
256+
Jsonix.Schema.XSD.AnySimpleType.INSTANCE,
256257
Jsonix.Schema.XSD.AnyURI.INSTANCE,
257258
Jsonix.Schema.XSD.Base64Binary.INSTANCE,
258259
Jsonix.Schema.XSD.Boolean.INSTANCE,

scripts/src/main/javascript/org/hisrc/jsonix/Jsonix/Schema/XSD/AnySimpleType.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ Jsonix.Schema.XSD.AnySimpleType = Jsonix.Class(Jsonix.Model.TypeInfo, {
55
Jsonix.Model.TypeInfo.prototype.initialize.apply(this, []);
66
},
77
print : function(value, context, output, scope) {
8-
throw new Error('Abstract method [print].');
8+
return value;
99
},
1010
parse : function(text, context, input, scope) {
11-
throw new Error('Abstract method [parse].');
11+
return text
12+
},
13+
isInstance : function(value, context, scope) {
14+
return true;
1215
},
1316
reprint : function(value, context, output, scope) {
1417
// Only reprint when the value is a string but not an instance
@@ -42,3 +45,4 @@ Jsonix.Schema.XSD.AnySimpleType = Jsonix.Class(Jsonix.Model.TypeInfo, {
4245
},
4346
CLASS_NAME : 'Jsonix.Schema.XSD.AnySimpleType'
4447
});
48+
Jsonix.Schema.XSD.AnySimpleType.INSTANCE = new Jsonix.Schema.XSD.AnySimpleType();

0 commit comments

Comments
 (0)