masnathan/parser

This package is abandoned and no longer maintained. No replacement package was suggested.

Global data type parser

v0.0.1 2015-08-31 21:13 UTC

This package is auto-updated.

Last update: 2023-06-16 13:38:35 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads Support via Gittip

Global data type parser

Install

Via Composer

$ composer require masnathan/parser

Usage

use MASNathan\Parser\Parser;

$data = array(
    'foo' => 'bar',
    'sup' => 'World'
);

$content = Parser::data($data);
$content->setPrettyOutput(true);

echo $content->to('json'); // outputs in json format
echo $content->to('xml'); // outputs in xml format

And also...

$content = Parser::file('path/to/my/file.json')->from('json');

echo $content->to('xml'); // outputs in xml format

// or
echo Parser::file('path/to/my/file.xml')
		->from('xml')
		->setPrettyOutput(true)
		->to('yaml');

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email andre.r.flip@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.