Skip to content

Commit f674091

Browse files
author
Ethan Jinks O'Sullivan
committed
Update README
1 parent fc50bf6 commit f674091

File tree

1 file changed

+43
-16
lines changed

1 file changed

+43
-16
lines changed

README.md

+43-16
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,16 @@
11
# XML to JSON API
22
---
33

4-
Inspired by [Tamlyn's XML2JSON](https://github.com/tamlyn/xml2json) converter, this simple API converts dynamic XML feeds to JSON by entering the URL in a parameter (`xml`). This ensures that the most recent XML data is converted to a JSON.
5-
6-
## How to Use
7-
8-
This API is current available for use by visiting:
9-
10-
### https://api.factmaven.com/xml-to-json
11-
12-
Then, adding your XML URL like so:
13-
14-
```
15-
https://api.factmaven.com/xml-to-json?xml=http://example.com/feed.xml
16-
17-
```
18-
19-
Just add you XML feed URL in the parameter (`xml=...`).
4+
* [Overview](#overview)
5+
* [How to Use](#how-to-use)
6+
* [Option 1: Submitting the XML URL](#option-1-submitting-the-xml-url)
7+
* [Option 2: Paste Raw XML Data](#option-2-paste-raw-xml-data)
8+
* [Contributors](#contributors)
209

2110
## Overview
2211

12+
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.
13+
2314
> *"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..."*
2415
>
2516
> [Tamlyn Rhodes](https://outlandish.com/blog/tutorial/xml-to-json/)
@@ -68,3 +59,39 @@ That's where the **XML to JSON API** comes in, it converts dynamic XML feeds to
6859
]
6960

7061
```
62+
63+
## How to Use
64+
65+
This API is currently available for use by visiting:
66+
67+
### [`https://api.factmaven.com/xml-to-json`](https://api.factmaven.com/xml-to-json)
68+
69+
Then you can do one of the following:
70+
71+
### Option 1: Submitting the XML URL
72+
73+
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.
74+
75+
#### Example
76+
77+
```
78+
https://api.factmaven.com/xml-to-json?xml=https://example.com/feed.xml
79+
80+
```
81+
82+
### Option 2: Paste Raw XML Data
83+
84+
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.
85+
86+
#### Example
87+
88+
```
89+
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>
90+
91+
```
92+
93+
## Contributors
94+
95+
We would like to thank those who [helped us improve our API](https://github.com/factmaven/xml-to-json/graphs/contributors) with new features and fixing bugs. If you have any suggestions to improve our API or find any bugs, let us know [here](https://github.com/factmaven/xml-to-json/issues). Your feedback and suggestions are always welcome.
96+
97+
### [Ethan O'Sullivan](https://github.com/ethanosullivan), [Edward Bebbington](https://github.com/ebebbington)

0 commit comments

Comments
 (0)