From 0a223c7b3e5dce286811fb12bbab681e7212ebfe Mon Sep 17 00:00:00 2001 From: Adi Vaknin <6841988+DeepSpace2@users.noreply.github.com> Date: Fri, 28 Jun 2024 00:01:56 +0300 Subject: [PATCH] Made examples compatible with both Python 2 and 3 and fixed some typos (#41) Made examples compatible with both Python 2 and 3 and fixed some typos --- examples/basic.py | 4 ++-- examples/clubbing_keys_of_array_of_objects.py | 2 +- examples/deep_nesting.py | 2 +- examples/setting_custom_attrs.py | 4 ++-- test/basic.json | 2 +- test/basic.txt | 2 +- test/setting_custom_attrs.json | 2 +- test/setting_custom_attrs.txt | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/basic.py b/examples/basic.py index c33028f..b0d6889 100644 --- a/examples/basic.py +++ b/examples/basic.py @@ -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) diff --git a/examples/clubbing_keys_of_array_of_objects.py b/examples/clubbing_keys_of_array_of_objects.py index ca299a3..3877c73 100644 --- a/examples/clubbing_keys_of_array_of_objects.py +++ b/examples/clubbing_keys_of_array_of_objects.py @@ -13,4 +13,4 @@ } output = json2html.convert(json = _json) -print output +print(output) diff --git a/examples/deep_nesting.py b/examples/deep_nesting.py index f33b20e..30c5818 100644 --- a/examples/deep_nesting.py +++ b/examples/deep_nesting.py @@ -29,4 +29,4 @@ } output = json2html.convert(json = _json) -print output +print(output) diff --git a/examples/setting_custom_attrs.py b/examples/setting_custom_attrs.py index 937d562..f2ade5f 100644 --- a/examples/setting_custom_attrs.py +++ b/examples/setting_custom_attrs.py @@ -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) diff --git a/test/basic.json b/test/basic.json index aef2860..3139486 100644 --- a/test/basic.json +++ b/test/basic.json @@ -1,4 +1,4 @@ { "name": "Json2Html", - "desription": "converts json 2 html table format" + "description": "converts json 2 html table format" } diff --git a/test/basic.txt b/test/basic.txt index ae7d782..f0ccc8a 100644 --- a/test/basic.txt +++ b/test/basic.txt @@ -4,7 +4,7 @@