I believe that with today's release the ASP Xtreme Evolution Framework reaches a real maturity to handle JSON. ORDERLY.ASP leverages the power of the Orderly descriptors to your Classic ASP application. Although it's bundled with the AXE, it's modularized enough to work alone for the Orderly.parse method, which returns the JSONSchema subset, or in ensemble with JSON2.ASP which enables Orderly.compile to stringify the JSONSchema representation.

The name behind this release is Zach Carter which made Orderly.js some months ago and keep updating the project since then. The only effort from my part was to document it in the AXE way and write some examples.

Here are some examples of how to use it:

Retriving the JSONSchema subset from an orderly source

<script language="javascript" runat="server" src="/lib/axe/Parsers/orderly.asp"></script>
<%

dim source : source = join(array( _
    "object {", _
    "  string name;", _
    "  string description?;", _
    "  string homepage /^http:/;", _
    "  integer {1500,3000} invented;", _
    "}*;" _
), vbNewline)

dim Schema : set Schema = Orderly.parse(source)
Response.write( typename( Schema ) & vbNewline )
set Schema = nothing

%>

prints:

JScriptTypeInfo
 

Checking the JSONSchema stringified representation

<script language="javascript" runat="server" src="/lib/axe/Parsers/orderly.asp"></script>
<script language="javascript" runat="server" src="/lib/axe/Parsers/json2.asp"></script>
<%

dim source : source = join(array( _
    "object {", _
    "  string name;", _
    "  string description?;", _
    "  string homepage /^http:/;", _
    "  integer {1500,3000} invented;", _
    "}*;" _
), vbNewline)

Response.write( Orderly.compile(source) & vbNewline )

%>

prints:

{
    "type": "object",
    "properties": {
        "name": {
            "type": "string"
        },
        "description": {
            "type": "string",
            "optional": true
        },
        "homepage": {
            "type": "string",
            "pattern": "^http:"
        },
        "invented": {
            "type": "integer",
            "minimum": 1500,
            "maximum": 3000
        }
    },
    "additionalProperties": true
}
 

Download & Source