TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Teleport – Lightweight JSON types

26 pointsby boronineover 10 years ago

4 comments

alexatkeplarover 10 years ago
It looks like Teleport is trying to do too many things.<p>Input validation systems are great - there&#x27;s an excellent one for Python already, called Schematics (<a href="https://github.com/schematics/schematics" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;schematics&#x2F;schematics</a>).<p>Declarative schema systems are also great - JSON Schema (<a href="http://json-schema.org/" rel="nofollow">http:&#x2F;&#x2F;json-schema.org&#x2F;</a>) is the industry standard for JSON. The clever thing about JSON Schema is that it is itself written using JSON - so it&#x27;s completely language independent. A JSON Schema is a document which you can a) version and b) upload to a schema repository like Iglu (<a href="https://github.com/snowplow/iglu" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;snowplow&#x2F;iglu</a>). I don&#x27;t see any equivalent non-language-tied schema approach in Teleport.<p>Thirdly, tooling to help document APIs is also a great aim - the go-to project here is Swagger (<a href="https://helloreverb.com/developers/swagger" rel="nofollow">https:&#x2F;&#x2F;helloreverb.com&#x2F;developers&#x2F;swagger</a>).<p>These are all huge problems _in themselves_, and the above solutions have lots of cross-platform tooling, developer mindshare and polyglot language support. I think you need to decide what problem you want Teleport to solve...
评论 #8477173 未加载
评论 #8477179 未加载
评论 #8476870 未加载
stdbrouwover 10 years ago
Hmm, so the types are not actually a part of the JSON output, but they live in a separate schema. That being the case, I would&#x27;ve preferred if this were built on top of <a href="http://json-schema.org/" rel="nofollow">http:&#x2F;&#x2F;json-schema.org&#x2F;</a> instead of something entirely new and Python-specific.<p>It seems like for the past couple of years JSON-schema has been just below some critical treshold for it to take off. Why not define models with JSON schema instead of a custom format for each web framework? Why not use JSON schemas to build forms, validation logic and admin interfaces, like <a href="https://github.com/jdorn/json-editor" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jdorn&#x2F;json-editor</a> does? Why not document your API by specifying the JSON schema a GET request returns? (<a href="http://raml.org/" rel="nofollow">http:&#x2F;&#x2F;raml.org&#x2F;</a> sort of does this).<p>Seems like a chicken and egg problem where currently the tools are not yet nice enough to merit widespread adoption, but with widespread adoption they&#x27;d get to be really nice and cross-platform.
评论 #8476418 未加载
mstadeover 10 years ago
How does this compare to something like transit[1]?<p>[1]: <a href="https://github.com/cognitect/transit-format" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;cognitect&#x2F;transit-format</a>
评论 #8477248 未加载
theflubbaover 10 years ago
Just use protocol buffers. This can&#x27;t really be a serious competitor to json&#x2F;thrift&#x2F;protobuf with no benchmarks and only a python client, sorry.
评论 #8476814 未加载