microsoft / microsoft/typespec
[docs] TypeSpec JSON Interoperability Documentation
- Dominant language
- Java
- Stars
- 5.9k
- Forks
- 394
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 104
Description
Since the langauge and emitter ecosystem is maturing it would be useful to have a prescriptive specification of how to encode values representing TypeSpec data types to JSON for interoperability with other emitters.
This would allow us to easily answer questions like:
- What is the normative representation of `TypeSpec.bytes` in a JSON payload?
- What are the _must use_ decorators that need to be checked when emitting a model property, union, or other such type that may need special attention when encoding as JSON?
- How do I choose a JSON representation for a given scalar type?
Adherence to such a specification wouldn't be a hard requirement _per se_, but doing so would ensure that JSON serializations are compatible between different emitters, and it would serve as a reference for emitter authors.
Contributor guide
Assessment
This issue has not been assessed yet.