Skip to content

maml-dev/maml-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

maml-php

A modern, well‑tested implementation of the MAML data format for PHP.

  • Spec‑accurate parser and pretty serializer
  • Zero dependencies
  • 100% test coverage (classes, methods, lines)

Installation

composer require maml/maml

Usage

use Maml\Maml;

$data = Maml::parse('{
  project: "MAML"
  tags: [
    "minimal"
    "readable"
  ]

  # A simple nested object
  spec: {
    version: 1
    author: "Anton Medvedev"
  }

  notes: """
This is a raw multiline string.
Keeps formatting as‑is.
"""
}');

echo $data['project']; // "MAML"

$text = Maml::stringify(['foo' => 'bar', 'list' => [1, 2, 3]]);
/*
{
  foo: "bar"
  list: [
    1
    2
    3
  ]
}
*/

License

MIT

About

PHP MAML Parser

Resources

License

Stars

Watchers

Forks

Contributors

Languages