packagist mischasigtermans/laravel-toon v0.2.0

latest releases: v1.0.0, v0.2.2, v0.2.1...
one month ago

Added

  • Unified omit config array to skip values: ['null', 'empty', 'false'] or ['all']
  • omit_keys config array to always skip specific keys
  • key_aliases config for shortening key names (saves tokens)
  • date_format config for formatting DateTime objects and ISO date strings
  • truncate_strings config to limit string length with ellipsis
  • number_precision config to limit decimal places for floats
  • Toon::diff($data) method to calculate token savings between JSON and TOON
  • Toon::only($data, $keys) method to encode only specific keys

Changed

  • Replaced omit_null_values boolean with flexible omit array (breaking change)

Removed

  • omit_null_values config option (use 'omit' => ['null'] instead)

Don't miss a new laravel-toon release

NewReleases is sending notifications on new releases.