Skip to content

Releases: tobozo/YAMLDuino

1.4.2

18 Jun 14:44
bc40a8e
Compare
Choose a tag to compare
  • Added conditional macros for ArduinoJson 6.x support, YAMLDuino now supports both 6.x and 7.x

1.4.1

16 Jun 13:36
de7cfb9
Compare
Choose a tag to compare
  • Fixed quoted and non-quoted integers treated as double (see #20, thanks to @ronron-gh)
  • Migrated code to ArduinoJSON 7.x
  • Updated CI jobs

1.4.0

18 Dec 22:17
36db8f1
Compare
Choose a tag to compare

Changes

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

1.3.0

14 Dec 22:32
3c93b4e
Compare
Choose a tag to compare

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);
}

1.2.9

26 Oct 18:32
8c2f3d8
Compare
Choose a tag to compare

What's Changed

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

1.2.8

22 Oct 18:46
d1a8ad8
Compare
Choose a tag to compare
  • Created pure libyaml JSON stream to YAML stream conversion
  • Updated documentation

1.2.7

21 Oct 23:40
247afad
Compare
Choose a tag to compare
  • 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]

1.2.6

17 Oct 21:12
3bbad14
Compare
Choose a tag to compare
  • fixes some 32bytes mem leaks in esp8266 versions of deserializeYml
  • implements multiline YAML_LITERAL_SCALAR_STYLE

1.2.5

15 Oct 19:12
90f7296
Compare
Choose a tag to compare

special thanks to @mongonta0716 for testing and reporting 🙇

1.2.4

15 Oct 13:07
0add0f5
Compare
Choose a tag to compare
  • fix for platformio lib_deps failing to resolve