All Projects → karupanerura → Toml Parser

karupanerura / Toml Parser

Licence: other
simple toml parser

Programming Languages

perl
6916 projects

Labels

Projects that are alternatives of or similar to Toml Parser

j-toml
A Node.js implementation of TOML written by LongTengDao. Belong to "Plan J"./龙腾道为汤小明语写的 Node.js 实现。从属于“简计划”。
Stars: ✭ 21 (+61.54%)
Mutual labels:  toml
Tomlplusplus
Header-only TOML config file parser and serializer for C++17 (and later!).
Stars: ✭ 403 (+3000%)
Mutual labels:  toml
Structured Text Tools
A list of command line tools for manipulating structured text data
Stars: ✭ 6,180 (+47438.46%)
Mutual labels:  toml
Toml Node
TOML parser for Node.js and the Browser. Parses TOML v0.4.0
Stars: ✭ 255 (+1861.54%)
Mutual labels:  toml
Engine
Monibuca 核心引擎,包含流媒体核心转发逻辑,需要配合功能插件一起组合运行
Stars: ✭ 340 (+2515.38%)
Mutual labels:  toml
Pytablewriter
pytablewriter is a Python library to write a table in various formats: CSV / Elasticsearch / HTML / JavaScript / JSON / LaTeX / LDJSON / LTSV / Markdown / MediaWiki / NumPy / Excel / Pandas / Python / reStructuredText / SQLite / TOML / TSV.
Stars: ✭ 422 (+3146.15%)
Mutual labels:  toml
fstoml
Lightweight TOML based F# project file
Stars: ✭ 36 (+176.92%)
Mutual labels:  toml
Hugo Elasticsearch
Generate Elasticsearch indexes for Hugo static sites by parsing front matter
Stars: ✭ 19 (+46.15%)
Mutual labels:  toml
Toml11
TOML for Modern C++
Stars: ✭ 390 (+2900%)
Mutual labels:  toml
Python Shortcuts
Create Siri Shortcuts with Python
Stars: ✭ 525 (+3938.46%)
Mutual labels:  toml
Jinja2 Cli
CLI for Jinja2
Stars: ✭ 302 (+2223.08%)
Mutual labels:  toml
Gopli
DB replication tool to synchronize data with multi environments written in Golang.
Stars: ✭ 327 (+2415.38%)
Mutual labels:  toml
Remarshal
Convert between CBOR, JSON, MessagePack, TOML, and YAML
Stars: ✭ 421 (+3138.46%)
Mutual labels:  toml
toml-sort
Toml sorting library
Stars: ✭ 31 (+138.46%)
Mutual labels:  toml
Mpv.net
🎞 mpv.net is a modern media player for Windows that works just like mpv.
Stars: ✭ 737 (+5569.23%)
Mutual labels:  toml
qtoml
Another Python TOML encoder/decoder
Stars: ✭ 26 (+100%)
Mutual labels:  toml
Echo Web
Go web framework Echo example. 在线演示☞迁移ing❌
Stars: ✭ 409 (+3046.15%)
Mutual labels:  toml
Config Rs
⚙️ Layered configuration system for Rust applications (with strong support for 12-factor applications).
Stars: ✭ 915 (+6938.46%)
Mutual labels:  toml
Dasel
Query, update and convert data structures from the command line. Comparable to jq/yq but supports JSON, TOML, YAML, XML and CSV with zero runtime dependencies.
Stars: ✭ 759 (+5738.46%)
Mutual labels:  toml
Koanf
Light weight, extensible configuration management library for Go. Built in support for JSON, TOML, YAML, env, command line, file, S3 etc. Alternative to viper.
Stars: ✭ 450 (+3361.54%)
Mutual labels:  toml

Build Status Coverage Status

NAME

TOML::Parser - simple toml parser

SYNOPSIS

use TOML::Parser;

my $parser = TOML::Parser->new;
my $data   = $parser->parse($toml);

DESCRIPTION

TOML::Parser is a simple toml parser.

This data structure complies with the tests provided at https://github.com/toml-lang/toml/tree/v0.4.0/tests.

The v0.4.0 specification is supported.

METHODS

  • my $parser = TOML::Parser->new(\%args)

    Creates a new TOML::Parser instance.

    use TOML::Parser;
    
    # create new parser
    my $parser = TOML::Parser->new();
    

    Arguments can be:

    • inflate_datetime

      If use it, You can replace inflate datetime process. The subroutine of default is identity. e.g.) sub { $_[0] }

      use TOML::Parser;
      use DateTime;
      use DateTime::Format::ISO8601;
      
      # create new parser
      my $parser = TOML::Parser->new(
          inflate_datetime => sub {
              my $dt = shift;
              return DateTime::Format::ISO8601->parse_datetime($dt);
          },
      );
      
    • inflate_boolean

      If use it, You can replace inflate boolean process. The return value of default subroutine is Types::Serialiser::true or Types::Serialiser::false.

      use TOML::Parser;
      
      # create new parser
      my $parser = TOML::Parser->new(
          inflate_boolean => sub {
              my $boolean = shift;
              return $boolean eq 'true' ? 1 : 0;
          },
      );
      
    • strict_mode

      TOML::Parser is using a more flexible rule for compatibility with old TOML of default. If make this option true value, You can parse a toml with strict rule.

      use TOML::Parser;
      
      # create new parser
      my $parser = TOML::Parser->new(
          strict_mode => 1
      );
      
  • my $data = $parser->parse_file($path)

  • my $data = $parser->parse_fh($fh)

  • my $data = $parser->parse($src)

    Transforms a string containing toml to a perl data structure or vice versa.

SEE ALSO

TOML

LICENSE

Copyright (C) karupanerura.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

karupanerura [email protected]

CONTRIBUTOR

Olivier Mengué [email protected] yowcow [email protected] Syohei YOSHIDA [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].