typescript-json-schema
jq
Our great sponsors
typescript-json-schema | jq | |
---|---|---|
9 | 306 | |
3,030 | 25,063 | |
- | - | |
6.3 | 0.0 | |
22 days ago | 11 months ago | |
TypeScript | C | |
BSD 3-clause "New" or "Revised" License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
typescript-json-schema
-
6 Reasons why JSON Schema is worth your time
Typescript to JSON Schema
-
Parse, Don't Validate (2019)
For anyone using both TypeScript and JSON schemas, but wanting to use TypeScript as the source of truth, I highly recommend the following library: [ts-json-schema-generator](https://github.com/YousefED/typescript-json-schema).
It does exactly what it says in the box: turns your TypeScript `types` / `interface` into machine-readable JSON schemas.
The library has a few open issues (does not deal well with some edge cases of composing Omit<> on sum types, and does not support dynamic (const) keys), but compared to manually writing JSON schemas, it's been amazing!
-
Is it possible to validate a json only according to a type? [node with typescript]
There are a bunch of tools to generate JSON-schema from a TS codebase, ie https://github.com/YousefED/typescript-json-schema
-
Input validation in Express from TypeScript
Now that cool thing we wanted to do? This library does exactly that!
-
YAML: It's Time to Move On
> For more complex cases I find myself wishing I could just turn Typescript into some kind of schema validation for JSON.
Not sure if this is what you're looking for, and whether it's powerful and expressive enough for your use case, but you can use typescript-json-schema¹ for this, and validate with eg ajv.
¹https://github.com/YousefED/typescript-json-schema
-
ts-rs - generate typescript type declarations from rust types
Use https://github.com/YousefED/typescript-json-schema to go from TS -> json schema
-
What can I *use* Rust for?
For what it's worth, thanks to TypeScript transformers (a feature baked into the compiler), one can create a transformer library that verifies an object is valid for any TypeScript type and conveys that information to the typechecker. And indeed, it's already been made. It allows to parse unknown into a given T. This is nice, because one can generate a JSON schema out of a TS type, for other languages/codebases to integrate safely.
-
JSON Schema bundling finally formalised
This is why I originally started a project to convert ts to json schema; https://github.com/YousefED/typescript-json-schema (and also check out a good alternative https://github.com/vega/ts-json-schema-generator)
-
How to use typescript & sails js for your REST API (Safer seas)
Typescript JSON schema
jq
-
GNU Parallel, where have you been all my life?
That should recursively list directories, counting only the files within each, and output² jsonl that can be further mangled within the shell². You could just as easily populate an associative array for further work, or $whatever. Unlike bash, zsh has reasonable behaviour around quoting and whitespace too.
¹ https://zsh.sourceforge.io/Doc/Release/User-Contributions.ht...
² https://github.com/jpmens/jo
³ https://github.com/stedolan/jq
- How do i edit reputation?
-
Jj: JSON Stream Editor
What I miss from jq and what is implemented but unreleased is platform independent line delimiters.
jq on Windows produces \r\n terminated lines which can be annoying when used with Cygwin / MSYS2 / WSL. The '--binary' option to not convert line delimiters is one of those pending improvements.
https://github.com/stedolan/jq/commit/0dab2b18d73e561f511801...
-
Building and deploying a web API powered by ChatGPT
If you have jq installed you can use it to make the output look nicer.
-
Search in your Jupyter notebooks from the CLI, fast.
It requires jq for JSON processing and GNU parallel for concurrent searches in the notebooks.
- Check the jq manual!
- mkv vs mp4 metadata
-
Amazon Begs Employees Not to Leak Corporate Secrets to ChatGPT
jq is your friend.
- Memes are all cool and all. But this is your daily remaining that 10000! =
-
How to export/import/externally-edit/whatever WI entries?
The jq command (https://stedolan.github.io/jq/) is useful pulling that information out.
What are some alternatives?
ajv - The fastest JSON schema Validator. Supports JSON Schema draft-04/06/07/2019-09/2020-12 and JSON Type Definition (RFC8927)
yq - Command-line YAML, XML, TOML processor - jq wrapper for YAML/XML/TOML documents
typebox - Json Schema Type Builder with Static Type Resolution for TypeScript
dasel - Select, put and delete data from JSON, TOML, YAML, XML and CSV files with a single tool. Supports conversion between formats and can be used as a Go package.
ron - Rusty Object Notation
gojq - Pure Go implementation of jq
SailsJS - Realtime MVC Framework for Node.js
json5 - JSON5 — JSON for Humans
dhall-lang - Maintainable configuration files
jp - Validate and transform JSON with Bash
io-ts - Runtime type system for IO decoding/encoding
nushell - A new type of shell