-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from vinitkumar/feature/add-support-to-read-fro…
…m-file Feature/add support to read from file
- Loading branch information
Showing
11 changed files
with
137 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
*.pyc | ||
json2xml.egg-info\ | ||
json2xml.egg-info | ||
build | ||
*.swp | ||
dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
language: python | ||
# command to install dependencies | ||
install: | ||
- pip install -r requirements.txt | ||
- python setup.py install | ||
# command to run tests | ||
script: python tests/test.py |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"login": "octocat", | ||
"id": 1, | ||
"avatar_url": "https://github.com/images/error/octocat_happy.gif", | ||
"gravatar_id": "", | ||
"url": "https://api.github.com/users/octocat", | ||
"html_url": "https://github.com/octocat", | ||
"followers_url": "https://api.github.com/users/octocat/followers", | ||
"following_url": "https://api.github.com/users/octocat/following{/other_user}", | ||
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", | ||
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", | ||
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions", | ||
"organizations_url": "https://api.github.com/users/octocat/orgs", | ||
"repos_url": "https://api.github.com/users/octocat/repos", | ||
"events_url": "https://api.github.com/users/octocat/events{/privacy}", | ||
"received_events_url": "https://api.github.com/users/octocat/received_events", | ||
"type": "User", | ||
"site_admin": false, | ||
"name": "monalisa octocat", | ||
"company": "GitHub", | ||
"blog": "https://github.com/blog", | ||
"location": "San Francisco", | ||
"email": "[email protected]", | ||
"hireable": false, | ||
"bio": "There once was...", | ||
"public_repos": 2, | ||
"public_gists": 1, | ||
"followers": 20, | ||
"following": 0, | ||
"created_at": "2008-01-14T04:33:35Z", | ||
"updated_at": "2008-01-14T04:33:35Z" | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
BeautifulSoup==3.2.1 | ||
argparse==1.2.1 | ||
dict2xml==1.3 | ||
six==1.9.0 | ||
wsgiref==0.1.2 | ||
simplejson==3.6.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
from setuptools import setup, find_packages | ||
import os | ||
|
||
version = '0.6' | ||
version = '1.0.0' | ||
|
||
setup( | ||
name='json2xml', | ||
version=version, | ||
description='To covert json data to xml data', | ||
author='Vinit Kumar', | ||
author_email='[email protected]', | ||
url='http://github.com:vinitcool76/json2xml.git', | ||
url='http://github.com:vinitkumar/json2xml.git', | ||
packages=find_packages(), | ||
zip_safe=False, | ||
include_package_data=True, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
## | ||
# @file test.py | ||
# @Synopsis Unit test for json2xml | ||
# @author Vinit Kumar | ||
# @version | ||
# @date 2015-02-13 | ||
|
||
|
||
import unittest | ||
from json2xml.json2xml import Json2xml | ||
|
||
class Json2xmlTestCase(unittest.TestCase): | ||
|
||
def test_is_json_from_file_works(self): | ||
data = Json2xml.fromjsonfile('examples/example.json').data | ||
data_object = Json2xml(data) | ||
xml_output = data_object.json2xml() | ||
is_xml = xml_output.XML_ENTITIES | ||
self.assertEqual(is_xml, 'xml') | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |