All Projects → factmaven → xml-to-json

factmaven / xml-to-json

Licence: other
Simple API that converts dynamic XML feeds to JSON through a URL or pasting the raw XML data. Made 100% in PHP.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to xml-to-json

Jsona
Data formatter that creates simplified objects from JSON or stored reduxObject, creates JSON from the same simplified objects (in according with JSON API specification)
Stars: ✭ 144 (+278.95%)
Mutual labels:  converter, json-api
Unitsnet
Makes life working with units of measurement just a little bit better.
Stars: ✭ 641 (+1586.84%)
Mutual labels:  converter, parse
Breakdance
It's time for your markup to get down! HTML to markdown converter. Breakdance is a highly pluggable, flexible and easy to use.
Stars: ✭ 418 (+1000%)
Mutual labels:  converter, parse
bafi
Universal JSON, BSON, YAML, CSV, XML converter with templates
Stars: ✭ 65 (+71.05%)
Mutual labels:  converter, xml-to-json
video2gif
A batch script for convert video to GIF files by FFmpeg.exe on Windows
Stars: ✭ 48 (+26.32%)
Mutual labels:  converter
cyan
Cyan Color Converter
Stars: ✭ 68 (+78.95%)
Mutual labels:  converter
to-ico
Convert PNG to ICO in memory
Stars: ✭ 115 (+202.63%)
Mutual labels:  converter
gluon2pytorch
Gluon to PyTorch deep neural network model converter
Stars: ✭ 72 (+89.47%)
Mutual labels:  converter
ipynb-py-convert
Convert .py files runnable in VSCode or Atom/Hydrogen to Jupyter .ipynb notebooks and vice versa
Stars: ✭ 38 (+0%)
Mutual labels:  converter
abstract-syntax-tree
A library for working with abstract syntax trees.
Stars: ✭ 77 (+102.63%)
Mutual labels:  parse
parse
Parse with an Eloquent-like interface for Laravel
Stars: ✭ 15 (-60.53%)
Mutual labels:  parse
svg-quick-editor
SVG Quick Editor is a free and open-source SVG editing tool. It offers features such as editing SVG colors, viewing or deleting their paths.
Stars: ✭ 88 (+131.58%)
Mutual labels:  parse
color-converter
Command line tool for converting colors from RGB to HEX and vice versa.
Stars: ✭ 17 (-55.26%)
Mutual labels:  converter
bot-whatsapp
Unmaintained - Multipurpose WhatsApp Bot 🤖 using open-wa/wa-automate-nodejs library! ✨
Stars: ✭ 78 (+105.26%)
Mutual labels:  converter
json-server
Create a dummy REST API from a json file with zero coding in seconds
Stars: ✭ 34 (-10.53%)
Mutual labels:  json-api
medium-to-markdown
Converts Medium posts to markdown.
Stars: ✭ 68 (+78.95%)
Mutual labels:  converter
ical2json
A simple node package to convert ical data to json
Stars: ✭ 46 (+21.05%)
Mutual labels:  converter
limelight
A php Japanese language text analyzer and parser.
Stars: ✭ 76 (+100%)
Mutual labels:  parse
Tracker
Even the best of apps have their issues
Stars: ✭ 113 (+197.37%)
Mutual labels:  converter
jgeXml
The Just-Good-Enough XML Toolkit
Stars: ✭ 20 (-47.37%)
Mutual labels:  parse

XML to JSON API


Overview

This is an API that converts XML to JSON. If you are using an XML and don't want to go through the hassle of modifying it to be a JSON, this is the API for you. Simply submit the URL or raw data of the XML through the API and it will instantly convert your old feed to a JSON.

"Unfortunately, XML exists. For whatever reason, somebody once thought it was a good idea and now we’re stuck with it. Since most modern applications and APIs use JSON instead, it’s often necessary to convert XML into JSON..."

Tamlyn Rhodes

Some tools are not great at parsing XML data (such as en-US from locale). Specifically when there is data that within the attributes for example:

<item contentType="tv_episode" contentId="df9c946a-e891-11ea-adc1-0242ac120002">
    <pubDate>2020-08-27T11:39:57-05:00</pubDate>
    <title locale="en-US">Episode Title</title>
    <description locale="en-US">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</description>
    <rating systemCode="us-tv">TV-14</rating>
    <artwork url="https://example.com/image.jpg" type="tile_artwork" locales="en-US" />
</item>

While there are plenty of XML to JSON converters available, none of them would convert a feed with live data that's constantly changing and updating its layout.

That's where the XML to JSON API comes in, it converts dynamic XML feeds to JSON. As a result, it will be able to parse those attribute values in a JSON format:

"item": [
    {
        "@contentType": "tv_episode",
        "@contentId": "df9c946a-e891-11ea-adc1-0242ac120002",
        "pubDate": "2020-03-26T11:39:57-05:00",
        "title": {
            "@locale": "en-US",
            "#text": "Episode Title"
        },
        "description": {
            "@locale": "en-US",
            "#text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
        },
        "rating": {
            "@systemCode": "us-tv",
            "#text": "TV-14"
        },
        "artwork": {
            "@url": "https://example.com/image.jpg",
            "@type": "tile_artwork",
            "@locales": "en-US"
        }
    }
]

How to Use

This API is currently available for use by visiting:

https://api.factmaven.com/xml-to-json

Then you can do one of the following:

Option 1: Submitting the XML URL

Add the URL to your XML by adding the ?xml= parameter and then the full URL of your feed. It's important that you must start with http:// or https:// for it to work.

Example

https://api.factmaven.com/xml-to-json?xml=https://example.com/feed.xml

Option 2: Paste Raw XML Data

Paste the raw XML data after the ?xml= parameter. Do note that there is a limit to how much you can load, it's best for smaller XMLs.

Example

https://api.factmaven.com/xml-to-json?xml=<item contentType="tv_episode" contentId="df9c946a-e891-11ea-adc1-0242ac120002"><pubDate>2020-08-27T11:39:57-05:00</pubDate><title locale="en-US">Episode Title</title><description locale="en-US">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</description><rating systemCode="us-tv">TV-14</rating><artwork url="https://example.com/image.jpg" type="tile_artwork" locales="en-US" /></item>

Contributors

We would like to thank those who helped us improve our API with new features and fixing bugs. If you have any suggestions to improve our API or find any bugs, let us know here. Your feedback and suggestions are always welcome.

Ethan O'Sullivan, Edward Bebbington

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].