Skip to content

jobywalker/Imperium-BadgerFish

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

\Imperium\BadgerFish

v1.2.3

A PHP Library to transform XML into JSON and JSON into XML following the BadgerFish convention.

Usage: <?php use \Imperium\BadgerFish;

$xml = '<Root><Children><Child><Order>1</Order><Name>John Doe</Name><Awesome>false</Awesome></Child>'
      .'<Child><Order>2</Order><Name>Jane Doe</Name><Awesome>true</Awesome></Child></Children></Root>';
$json = BadgerFish::xmlToJson($xml);
echo $json; # '{"Root":{"Children":{"Child":[{"Order":1,"Name":"John Doe","Awesome":false},{"Order":2,"Name":"Jane Doe","Awesome":true}]}}}'

echo BadgerFish::jsonToXML($json);

Joby Walker

About

PHP Library to perform simple BadgerFish transforms

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages