Skip to content

Commit

Permalink
Made examples compatible with both Python 2 and 3 and fixed some typos (
Browse files Browse the repository at this point in the history
#41)

Made examples compatible with both Python 2 and 3 and fixed some typos
  • Loading branch information
DeepSpace2 authored Jun 27, 2024
1 parent 247dca9 commit 0a223c7
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions examples/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

_json = {
"name": "Json2Html",
"desription": "converts json 2 html table format"
"description": "converts json 2 html table format"
}

output = json2html.convert(json = _json)
print output
print(output)
2 changes: 1 addition & 1 deletion examples/clubbing_keys_of_array_of_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
}

output = json2html.convert(json = _json)
print output
print(output)
2 changes: 1 addition & 1 deletion examples/deep_nesting.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@
}

output = json2html.convert(json = _json)
print output
print(output)
4 changes: 2 additions & 2 deletions examples/setting_custom_attrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
_json = {
'name': 'Json2Html',
'language':'python',
'desription': 'converts json 2 html table format'
'description': 'converts json 2 html table format'
}

output = json2html.convert(json = _json, table_attributes="class=\"table table-bordered table-hover\"")
print output
print(output)
2 changes: 1 addition & 1 deletion test/basic.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"name": "Json2Html",
"desription": "converts json 2 html table format"
"description": "converts json 2 html table format"
}
2 changes: 1 addition & 1 deletion test/basic.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<td>Json2Html</td>
</tr>
<tr>
<th>desription</th>
<th>description</th>
<td>converts json 2 html table format</td>
</tr>
</table>
2 changes: 1 addition & 1 deletion test/setting_custom_attrs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Json2Html",
"language":"python",
"desription": "converts json 2 html table format"
"description": "converts json 2 html table format"
}
2 changes: 1 addition & 1 deletion test/setting_custom_attrs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<td>python</td>
</tr>
<tr>
<th>desription</th>
<th>description</th>
<td>converts json 2 html table format</td>
</tr>
</table>

0 comments on commit 0a223c7

Please sign in to comment.