Go to file
Zykino b9bffdc19c Bump version to 0.1.1
Changelog:
  * Move the examples data files
  * Implement a first pass on every data format listed on serde.rs
2022-12-04 14:42:25 +01:00
scripts Tagging script should run the test and force formatting => dirty repo will prevent the tagging 2022-10-26 23:54:46 +02:00
src Add Bencode Deserialization 2022-12-04 14:24:05 +01:00
test-data Add Bencode Deserialization 2022-12-04 14:24:05 +01:00
tests Fix tests 2022-12-04 14:24:26 +01:00
.gitignore POC: Inital commit (transcode json, ron, yaml) 2022-09-17 20:29:35 +02:00
Cargo.lock Bump version to 0.1.1 2022-12-04 14:42:25 +01:00
Cargo.toml Bump version to 0.1.1 2022-12-04 14:42:25 +01:00
README.md Add Bencode Deserialization 2022-12-04 14:24:05 +01:00

Description

This tool "traduit" (french for translate) data formats. It was made in the hope to bring serde to the cli (serdi ^^). But that not exaclty what serde is about and I have no affiliation with them so I did not want to namesquat.

Installation

First install the rust toolchain and then execute the following command:

cargo install tradaf

Usage example

Prettify (or minify) some data format for ease of reading (resp: compact and have less data to save/transfert)

tradaf json json --pretty < simple.json 

Litterally transcode between data formats

tradaf ron yaml < examples/standard.ron

Transcode into JSON so we can use jq, do some transformations and then transcode again into another format for viewing

tradaf RON json < examples/gameConfig.ron | jq .key_bindings | tradaf Json yaml

TODOS

  • Implement all data formats, or at least the one that expose a serde serializer or deserializer.
    • [-] Bencode
      • Deserialization
      • Serialization
    • BSON
    • CBOR
    • [-] DBus (not sure it is working, but it compile…)
    • DynamoDB
    • Envy (deserialization only)
    • Envy store (deserialization only)
    • FlexBuffer
      • The Serializer and Deserializer exposed does not work with serde-transcode.
    • [-] GVariant => See DBus: the same crate propose both
    • HJSON
    • JSON
    • [-] JSON5
      • Deserialization
      • Serialization
    • https://github.com/Lucretiel/kaydle
    • S-Expressions (lisp)
    • Pickle
      • Test properly both way
    • [-] Query String (URL)
      • Deserialization
      • Serialization
    • [-] MessagePack
      • Deserialization
      • Serialization
    • RON
    • TOML
    • YAML
  • Add tests for each serializer and each deserializer (at least one)
  • Check if crates have features that we should enable/disable
    • zvariant looks to include async runtime by default
  • Check my notes for each data format and open an issue on the crates to point problem/present my project and ask for help
  • Add proper error handling (find a mentor to explain me propper error management: struct, enum, … and then use anyhow/this_error if needed)