2.4.1 JSON for Structure Values

It is also possible to use JavaScript Object Notation for structures by using string literals for the keys:

var point = { "x" : 1, "y" : -5 };

While any string literal is allowed, the field is only considered part of the type if it is a valid AIR SPEED identifier. Otherwise, AIR SPEED syntax does not allow expressing access to such a field, and reflection has to be employed through the use of Reflect.field and Reflect.setField instead.


网站整站下载器