Show HN: Shale – a Ruby object mapper and serializer for JSON, YAML and XML

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • shale

    Shale is a Ruby object mapper and serializer for JSON, YAML and XML. It allows you to parse JSON, YAML and XML data and convert it into Ruby data structures, as well as serialize data structures into JSON, YAML or XML.

  • SimpleAMS

    Fast modern plain Ruby serializers using zero dependencies

    Serialization/deserialization is such an important part of web development, I have no idea why Rails includes the ancient JBuilder (and very slow since it goes through templating) library, instead of investing in a proper library. Let alone deserializing which is equally important..

    I think the API Shale provides is pretty sane. I would probably use it in my next Ruby/Rails project. I don't like the fact that Nokogiri is included by default, it would be nice to declare a core type, and then bring in what you need (JSON, XML, YAML) as a different gem. But that's not a deal breaker for me.

    I have created my own serializers in the past (SimpleAMS[1]) because I really detested AMS, no offence to AMS contributors, but AMS library should just die. Rails, and way more importantly Ruby, should come up with an "official" serializers/deserializers library that is flexible enough, rock solid and fast. For instance I had done some benchmarking among common serializer libraries [2] and AMS was crazy slow, without providing much flexibility, really (meaning, slowness is not justified). Others were faster, but were supporting only one JSON spec format (like jsonapi-rb).

    Another thing is that most serialization libraries seem to have ActiveSupport as a main dependency (not shale though) which I think is a bit too much, and actually has a performance hit on the methods it provides. I really think that Ruby community can do better here ?

    [1] https://github.com/vasilakisfil/SimpleAMS

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • shale-website

    Landing page and interactive documentation for Shale - JSON/YAML/TOML/XML mapper and serializer for Ruby.

    It's a custom template I created, because I couldn't find anything that simple. The source code is available on https://github.com/kgiszczak/shale-website

    Interactive examples are powered by https://opalrb.com/

  • Opal

    Ruby ♥︎ JavaScript

    It's a custom template I created, because I couldn't find anything that simple. The source code is available on https://github.com/kgiszczak/shale-website

    Interactive examples are powered by https://opalrb.com/

  • HappyMapper

    Object to XML mapping library, using Nokogiri (Fork from John Nunemaker's Happymapper)

    Nice library with a very approachable documentation, congrats!

    I'll probably give it a go to replace my current implementation using nokogiri-happymapper (https://github.com/mvz/happymapper)

  • VuePress

    📝 Minimalistic Vue-powered static site generator

    Documentation site was based on https://vuepress.vuejs.org/ but it evolved so much I dropped Vue all together and wen't with plain HTML instead. I must have left that meta tag from the early days.

    Regarding Vue I use it daily at my job, great library :)

  • grape-entity

    An API focused facade that sits on top of an object model.

    Nice, it seems like a generic version of grape-entity https://github.com/ruby-grape/grape-entity

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • alba

    Alba is a JSON serializer for Ruby, JRuby and TruffleRuby.

    Have you checked out Alba [0]? I think it’s one of the better options right now.

    [0]: https://github.com/okuramasafumi/alba

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts