Last active
November 16, 2015 14:57
-
-
Save epost/4a3a04046a94139b2ab1 to your computer and use it in GitHub Desktop.
JSON schema for psc-ide
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
[ | |
{ | |
"module": "Data.Array", | |
"identifier": "filter", | |
"type": "forall a. (a -> Boolean) -> Array a -> Array a" | |
}, | |
{ | |
"module": "Data.Array", | |
"identifier": "map", | |
"type": "forall a b. (a -> b) -> Array a -> Array b" | |
} | |
] |
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
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"title": "psc-ide schema", | |
"type": "array", | |
"items": { | |
"title": "Completion results", | |
"type": "object", | |
"properties": { | |
"module": { | |
"description": "The module in which the identifier is defined.", | |
"$ref": "#/definitions/moduleIdentifierQ", | |
}, | |
"identifier": { | |
"type": "string" | |
}, | |
"type": { | |
"description": "The type of the identifier.", | |
"type": "string", | |
"minimum": 0 | |
} | |
}, | |
"required": ["module", "identifier", "type"] | |
}, | |
"definitions": { | |
"moduleIdentifierQ": { | |
"pattern": "^[A-Z][A-Za-z0-9_]*(\\.[A-Z][A-Za-z0-9_]*)*$", | |
"type": "string" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
try the schema and exmaple here: http://www.jsonschemavalidator.net/
psc-ide protocol description: https://github.com/kRITZCREEK/psc-ide/blob/master/PROTOCOL.md
json-schema examples: http://json-schema.org/example1.html.