Libxo: The Easy Way to Generate Text, XML, JSON, and HTML Output

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

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

    The libxo library allows an application to generate text, XML, JSON, and HTML output using a common set of function calls. The application decides at run time which output style should be produced.

  • MPWFoundation

  • > The difficulty here is to get streaming

    Polymorphic Write Streams do this.

    ACM DL: https://dl.acm.org/doi/10.1145/3359619.3359748

    pdf: http://www.hirschfeld.org/writings/media/WeiherHirschfeld_20...

    Code: https://github.com/mpw/MPWFoundation/tree/master/Streams.sub...

    Fast JSON parsing using this approach: https://blog.metaobject.com/2020/04/somewhat-less-lethargic-...

  • 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.

    InfluxDB logo
  • toml2json

    toml2json and json2toml, in rust

  • Serde can kind of do this for rust projects, but you're usually constrained to outputs that are "identical but for the syntax/format" (i.e. same field names though perhaps with different naming conventions).

    I've used that to convert configuration files from one language to the other, such as this json2toml and toml2json tool [0].

    [0]: https://github.com/neosmart/toml2json

  • Fluent

    Rust implementation of Project Fluent

  • > Typical printf usage is imperative and additive:

    > if (enter) printf("Hello "); else printf("Goodbye "); printf("World!\n");

    And unless you want your translator to hate you, you really, really mustn’t do this in user-facing output.

    (OK, you can if you really want to and if you’re ready to give them the same tools[1], but it won’t be simple. Although I’m unaware of any professional translators supporting this either—most use a CAT, and the Fluent approach ignores those.)

    [1] https://projectfluent.org/

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