Skip to content
This repository was archived by the owner on May 29, 2023. It is now read-only.

MASNathan/Parser

Repository files navigation

Parser

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.

About

Global data type parser

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages