You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a proposal for the addition of a "wildcard" type to the JSTN spec.
Adding such a "wildcard" type would essentially allow all JSON documents to be representable by JSTN... albeit with the introduction of some ambiguity in type information.
The proposed type might be represented in the grammar by the string literal any. Its behavior would be that it can be used to declare in a JSTN text that a property is expected in the JSON document, but without making claims about its value's type. The most obvious use-case for this, perhaps, would be to allow JSTN to represent JSON documents that container arrays with items of mixed inner types. e.g.,
This is a proposal for the addition of a "wildcard" type to the JSTN spec.
Adding such a "wildcard" type would essentially allow all JSON documents to be representable by JSTN... albeit with the introduction of some ambiguity in type information.
The proposed type might be represented in the grammar by the string literal
any
. Its behavior would be that it can be used to declare in a JSTN text that a property is expected in the JSON document, but without making claims about its value's type. The most obvious use-case for this, perhaps, would be to allow JSTN to represent JSON documents that container arrays with items of mixed inner types. e.g.,could at least be representable in JSTN, using the following type declaration:
Check out my pull request #1 to see an example of this in action.
The text was updated successfully, but these errors were encountered: