4 ms·
Completely agree. A key thing we realized recently at Snowplow was that people's data starts schema'ed - in MySQL tables, or Protocol Buffers, or Backbone model
by alexatkeplar 12y ago
Completely agree. A key thing we realized recently at Snowplow was that people's data starts schema'ed - in MySQL tables, or Protocol Buffers, or Backbone models. Normally when data is being passed around in JSONs (e.g. into/out of APIs, into SaaS analytics), it means the original schema has been _lost_ - not that there was never a schema in the first place. And that's something that needs fixing. We released Iglu (http://snowplowanalytics.com/blog/2014/07/01/iglu-schema-repository-released/ http://snowplowanalytics.com/blog/2014/07/01/iglu-schema-rep...) as a JSON Schema repository system recently and it's been really cool seeing people start to use it for other schema use cases outside of Snowplow.
- nitrogen 12y agoIf anyone finds JSON Schema in Ruby to be too slow, I developed a Ruby-based schema system that is much faster: http://rubygems.org/gems/classy_hash http://rubygems.org/gems/classy_hash https://github.com/deseretbook/classy_hash https://github.com/deseretbook/classy_hash I wrote it for an internal backend system at a small ecommerce site with a large retail legacy. Edit: Ruby Hashes (the base "language" used by Classy Hash) aren't easily serialized and shared, but if there's enough interest, it would be possible to compile most JSON Schema schemas to Classy Hash schemas.
- alexatkeplar 12y agoHave you looked contracts.ruby (https://github.com/egonSchiele/contracts.ruby https://github.com/egonSchiele/contracts.ruby)? I'm sure you could overlap some code
- nitrogen 12y agoInteresting. It looks like contracts.ruby does for method calls what Classy Hash aims to do for API data.