YAMLDuino

YAML <=> JSON converter for ESP32, ESP8266, RP2040 and possibly other devices

OTHER License

Stars
41
Committers
1

Bot releases are hidden (Show)

YAMLDuino - 1.4.1 Latest Release

Published by tobozo 4 months ago

  • Fixed quoted and non-quoted integers treated as double (see #20, thanks to @ronron-gh)
  • Migrated code to ArduinoJSON 7.x
  • Updated CI jobs
YAMLDuino - 1.4.0

Published by tobozo almost 2 years ago

Changes

  • drop YAMLParser class and leaky stream to stream conversion
  • add YAMLNode class
  • fix mem leak in i18n
  • code refactor
YAMLDuino - 1.3.0

Published by tobozo almost 2 years ago

Changes

  • Tested and enabled support for Teensy core
  • Added i18n setLocate() + yaml/json gettext() as an optional module

I18n and L10N support

Note: Support is disabled with WIO Terminal (needs a proper fs::FS implementation).

  • Load the module with #include <i18n/i18n.hpp>.
  • Assign a filesystem with i18n.setFS().
  • Load a locale with i18n.setLocale().
  • Use i18n.gettext() to access localized strings.

#include <LittleFS.h>
#include <ArduinoJson.h>
#define YAML_DISABLE_CJSON // not needed here
#include <YAMLDuino.h>
#include <i18n/i18n.hpp>

// Sample example `/lang/en-GB.yml` stored in LittleFS:
//
// en-GB:
//   hello: world
//   blah:
//     my_array:
//     - first
//     - second
//     - third


void setup()
{
  Serial.begin(115200);
  LittleFS.begin();

  i18n.setFS( &LittleFS ); // assign LittleFS
  i18n.setLocale("en-GB"); // will load "/lang/en-GB.yml" language file

  Serial.println( i18n.gettext("hello" ) ); // prints "world"
  Serial.println( i18n.gettext("blah:my_array:2" ) ); // prints "third"
}


void loop()
{

  delay(1000);
}
YAMLDuino - 1.2.9

Published by tobozo almost 2 years ago

What's Changed

  • Improved deserializeYml()
  • Some refactoring and macro tweaks (i.e. preparing AVR support)
YAMLDuino - 1.2.8

Published by tobozo almost 2 years ago

  • Created pure libyaml JSON stream to YAML stream conversion
  • Updated documentation
YAMLDuino - 1.2.7

Published by tobozo almost 2 years ago

  • added pure libyaml JSON stream to YAML stream conversion (no additional library required)
  • added flags to disable cJSON and/or ArduinoJSON functions
  • re-enabled JsonObject conversion for rp2040
  • found a memory leak in cJSON [wontfix]
YAMLDuino - 1.2.6

Published by tobozo about 2 years ago

  • fixes some 32bytes mem leaks in esp8266 versions of deserializeYml
  • implements multiline YAML_LITERAL_SCALAR_STYLE
YAMLDuino - 1.2.5

Published by tobozo about 2 years ago

special thanks to @mongonta0716 for testing and reporting 🙇

YAMLDuino - 1.2.4

Published by tobozo about 2 years ago

  • fix for platformio lib_deps failing to resolve
YAMLDuino - 1.2.3

Published by tobozo about 2 years ago

  • fixed another "use after free" situation
  • fixed first/last node mangled with esp8266, but created memleak (still WIP)
YAMLDuino - 1.2.2

Published by tobozo about 2 years ago

  • fixed logger
  • tweaked macros
YAMLDuino - 1.2.1

Published by tobozo about 2 years ago

  • Make ArduinoJson default on SAMD/RP2040/ESP8266
  • Fix url in properties
YAMLDuino - 1.2.0

Published by tobozo about 2 years ago

initial release 🥳