1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-19 00:17:51 +02:00

document schema

This commit is contained in:
Kelly Brazil
2022-07-19 07:45:13 -07:00
parent 0ed47fc7ce
commit 450d0d5ddf

View File

@ -11,13 +11,15 @@ Usage (module):
Schema:
[
{
"url": string,
"bar": boolean,
"baz": integer
}
]
{
"scheme": string,
"netloc": string,
"path": string,
"query": { object or null,
<query-key>: string
},
"fragment": string or null
}
Examples:
@ -33,8 +35,14 @@ Examples:
"fragment": "frag"
}
$ FTP example, etc.
[]
$ echo "ftp://localhost/filepath" | jc --url -p
{
"scheme": "ftp",
"netloc": "localhost",
"path": "/filepath",
"query": null,
"fragment": null
}
"""
from urllib.parse import urlparse
from typing import List, Dict