2 |
3 |
12 |
19 | Test!
20 |
21 |
22 |
23 |
69 |
--------------------------------------------------------------------------------
/frontend/src/generated_results/python2.json:
--------------------------------------------------------------------------------
1 | [{"url": "https://github.com/ronlut/jsonperf/blob/master/test_jsons/tiny.json", "data": [["test", "simplejson 3.17.2", "rapidjson 0.5.1", "ujson 2.0.3", "json 2.0.9"], ["serialize", "0.00437", "0.00074", "0.00072", "0.00263"], ["deserialize", "0.00208", "0.00077", "0.00044", "0.00257"]], "timestamp_s": 1608905195, "title": "tiny (0 objects)"}, {"url": "https://github.com/ronlut/jsonperf/blob/master/test_jsons/small.json", "data": [["test", "simplejson 3.17.2", "rapidjson 0.5.1", "ujson 2.0.3", "json 2.0.9"], ["serialize", "0.01745", "0.00621", "0.00855", "0.01285"], ["deserialize", "0.00870", "0.01130", "0.00692", "0.02129"]], "timestamp_s": 1608905195, "title": "small (1 object)"}, {"url": "https://github.com/ronlut/jsonperf/blob/master/test_jsons/medium.json", "data": [["test", "simplejson 3.17.2", "rapidjson 0.5.1", "ujson 2.0.3", "json 2.0.9"], ["serialize", "0.12141", "0.06176", "0.08450", "0.10459"], ["deserialize", "0.06475", "0.12455", "0.07286", "0.20219"]], "timestamp_s": 1608905195, "title": "medium (10 objects)"}, {"url": "https://github.com/ronlut/jsonperf/blob/master/test_jsons/large.json", "data": [["test", "simplejson 3.17.2", "rapidjson 0.5.1", "ujson 2.0.3", "json 2.0.9"], ["serialize", "1.17920", "0.64744", "0.84299", "1.02734"], ["deserialize", "0.69249", "1.28564", "0.85328", "2.17181"]], "timestamp_s": 1608905195, "title": "large (100 objects)"}, {"url": "https://github.com/ronlut/jsonperf/blob/master/test_jsons/twitter.json", "data": [["test", "simplejson 3.17.2", "rapidjson 0.5.1", "ujson 2.0.3", "json 2.0.9"], ["serialize", "1.19158", "0.65207", "0.84423", "1.02697"], ["deserialize", "0.68776", "1.27926", "0.85032", "2.16709"]], "timestamp_s": 1608905195, "title": "twitter (630 kb)"}]
--------------------------------------------------------------------------------
/frontend/src/generated_results/python3.json:
--------------------------------------------------------------------------------
1 | [{"url": "https://github.com/ronlut/jsonperf/blob/master/test_jsons/tiny.json", "title": "tiny (0 objects)", "timestamp_s": 1608905188, "data": [["test", "json 2.0.9", "orjson 3.4.6", "rapidjson 1.0", "simplejson 3.17.2", "ujson 4.0.1"], ["serialize", "0.00228", "0.00036", "0.00053", "0.00471", "0.00062"], ["deserialize", "0.00204", "0.00035", "0.00056", "0.00206", "0.00056"]]}, {"url": "https://github.com/ronlut/jsonperf/blob/master/test_jsons/small.json", "title": "small (1 object)", "timestamp_s": 1608905188, "data": [["test", "json 2.0.9", "orjson 3.4.6", "rapidjson 1.0", "simplejson 3.17.2", "ujson 4.0.1"], ["serialize", "0.01258", "0.00202", "0.00690", "0.01919", "0.00579"], ["deserialize", "0.01026", "0.00521", "0.00838", "0.01221", "0.00727"]]}, {"url": "https://github.com/ronlut/jsonperf/blob/master/test_jsons/medium.json", "title": "medium (10 objects)", "timestamp_s": 1608905188, "data": [["test", "json 2.0.9", "orjson 3.4.6", "rapidjson 1.0", "simplejson 3.17.2", "ujson 4.0.1"], ["serialize", "0.10131", "0.01712", "0.07143", "0.13412", "0.06357"], ["deserialize", "0.08210", "0.05455", "0.09644", "0.09753", "0.07995"]]}, {"url": "https://github.com/ronlut/jsonperf/blob/master/test_jsons/large.json", "title": "large (100 objects)", "timestamp_s": 1608905188, "data": [["test", "json 2.0.9", "orjson 3.4.6", "rapidjson 1.0", "simplejson 3.17.2", "ujson 4.0.1"], ["serialize", "1.06908", "0.19067", "0.66925", "1.32008", "0.65780"], ["deserialize", "0.86299", "0.60634", "1.06482", "1.00604", "0.93033"]]}, {"url": "https://github.com/ronlut/jsonperf/blob/master/test_jsons/twitter.json", "title": "twitter (630 kb)", "timestamp_s": 1608905188, "data": [["test", "json 2.0.9", "orjson 3.4.6", "rapidjson 1.0", "simplejson 3.17.2", "ujson 4.0.1"], ["serialize", "1.16554", "0.19653", "0.65214", "1.32894", "0.60369"], ["deserialize", "0.99758", "0.64200", "1.05210", "0.98404", "0.87980"]]}]
--------------------------------------------------------------------------------
/frontend/src/main.js:
--------------------------------------------------------------------------------
1 | import Vue from "vue";
2 | import App from "./App.vue";
3 | import router from "./router";
4 | import store from "./store";
5 | import ECharts from "vue-echarts";
6 | import "echarts/lib/chart/bar";
7 | import vuetify from "./plugins/vuetify";
8 | import VueGtag from "vue-gtag";
9 |
10 | Vue.config.productionTip = false;
11 | Vue.component("v-chart", ECharts);
12 | Vue.use(VueGtag, {
13 | config: {
14 | id: "G-2FB2J1LW8R"
15 | }
16 | });
17 |
18 | new Vue({
19 | router,
20 | store,
21 | vuetify,
22 | render: h => h(App)
23 | }).$mount("#app");
24 |
--------------------------------------------------------------------------------
/frontend/src/plugins/vuetify.js:
--------------------------------------------------------------------------------
1 | import Vue from "vue";
2 | import Vuetify from "vuetify/lib";
3 |
4 | Vue.use(Vuetify);
5 |
6 | export default new Vuetify({
7 | theme: {
8 | options: {
9 | // customProperties: true
10 | },
11 | // themes: {
12 | // light: {
13 | // primary: "#ee44aa",
14 | // secondary: "#424242",
15 | // accent: "#82B1FF",
16 | // error: "#FF5252",
17 | // info: "#2196F3",
18 | // success: "#4CAF50",
19 | // warning: "#FFC107"
20 | // }
21 | // }
22 | }
23 | });
24 |
--------------------------------------------------------------------------------
/frontend/src/router/index.js:
--------------------------------------------------------------------------------
1 | import Vue from "vue";
2 | import VueRouter from "vue-router";
3 | // import Home from "../views/Home.vue";
4 |
5 | Vue.use(VueRouter);
6 |
7 | const routes = [
8 | // {
9 | // path: "/",
10 | // name: "Home",
11 | // component: Home
12 | // },
13 | // {
14 | // path: "/about",
15 | // name: "About",
16 | // // route level code-splitting
17 | // // this generates a separate chunk (about.[hash].js) for this route
18 | // // which is lazy-loaded when the route is visited.
19 | // component: () =>
20 | // import(/* webpackChunkName: "about" */ "../views/About.vue")
21 | // }
22 | ];
23 |
24 | const router = new VueRouter({
25 | routes
26 | });
27 |
28 | export default router;
29 |
--------------------------------------------------------------------------------
/frontend/src/store/index.js:
--------------------------------------------------------------------------------
1 | import Vue from "vue";
2 | import Vuex from "vuex";
3 |
4 | import createPersistedState from "vuex-persistedstate";
5 |
6 | Vue.use(Vuex);
7 |
8 | export default new Vuex.Store({
9 | state: {
10 | dark: false
11 | },
12 | mutations: {
13 | toggleDark(state) {
14 | state.dark = !state.dark;
15 | }
16 | },
17 | actions: {},
18 | modules: {},
19 | plugins: [createPersistedState()]
20 | });
21 |
--------------------------------------------------------------------------------
/frontend/src/views/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ronlut/jsonperf/f50ff237e9c42ed61aa89f823a5b43290371dbf5/frontend/src/views/.gitkeep
--------------------------------------------------------------------------------
/frontend/vue.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | chainWebpack: config => {
3 | config
4 | .plugin('html')
5 | .tap(args => {
6 | args[0].title = "JSONPerf";
7 | return args;
8 | })
9 | },
10 | transpileDependencies: ["vuetify", "vue-echarts", "resize-detector"],
11 | configureWebpack: {
12 | devServer: {
13 | // disableHostCheck: true,
14 | proxy: {
15 | "/": {
16 | target: "http://localhost:5000",
17 | // pathRewrite: { "^/api": "" }
18 | }
19 | }
20 | }
21 | }
22 | };
23 |
--------------------------------------------------------------------------------
/python/.gitignore:
--------------------------------------------------------------------------------
1 | venv*/
2 | .idea/
3 | *.iml
4 |
5 | # Byte-compiled / optimized / DLL files
6 | __pycache__/
7 | *.py[cod]
8 | *$py.class
9 |
10 | # C extensions
11 | *.so
12 |
13 | # Distribution / packaging
14 | .Python
15 | build/
16 | develop-eggs/
17 | dist/
18 | downloads/
19 | eggs/
20 | .eggs/
21 | lib/
22 | lib64/
23 | parts/
24 | sdist/
25 | var/
26 | wheels/
27 | share/python-wheels/
28 | *.egg-info/
29 | .installed.cfg
30 | *.egg
31 | MANIFEST
32 |
33 | # PyInstaller
34 | # Usually these files are written by a python script from a template
35 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
36 | *.manifest
37 | *.spec
38 |
39 | # Installer logs
40 | pip-log.txt
41 | pip-delete-this-directory.txt
42 |
43 | # Unit test / coverage reports
44 | htmlcov/
45 | .tox/
46 | .nox/
47 | .coverage
48 | .coverage.*
49 | .cache
50 | nosetests.xml
51 | coverage.xml
52 | *.cover
53 | *.py,cover
54 | .hypothesis/
55 | .pytest_cache/
56 | cover/
57 |
58 | # Translations
59 | *.mo
60 | *.pot
61 |
62 | # Django stuff:
63 | *.log
64 | local_settings.py
65 | db.sqlite3
66 | db.sqlite3-journal
67 |
68 | # Flask stuff:
69 | instance/
70 | .webassets-cache
71 |
72 | # Scrapy stuff:
73 | .scrapy
74 |
75 | # Sphinx documentation
76 | docs/_build/
77 |
78 | # PyBuilder
79 | .pybuilder/
80 | target/
81 |
82 | # Jupyter Notebook
83 | .ipynb_checkpoints
84 |
85 | # IPython
86 | profile_default/
87 | ipython_config.py
88 |
89 | # pyenv
90 | # For a library or package, you might want to ignore these files since the code is
91 | # intended to run in multiple environments; otherwise, check them in:
92 | # .python-version
93 |
94 | # pipenv
95 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
96 | # However, in case of collaboration, if having platform-specific dependencies or dependencies
97 | # having no cross-platform support, pipenv may install dependencies that don't work, or not
98 | # install all needed dependencies.
99 | #Pipfile.lock
100 |
101 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow
102 | __pypackages__/
103 |
104 | # Celery stuff
105 | celerybeat-schedule
106 | celerybeat.pid
107 |
108 | # SageMath parsed files
109 | *.sage.py
110 |
111 | # Environments
112 | .env
113 | .venv
114 | env/
115 | venv/
116 | ENV/
117 | env.bak/
118 | venv.bak/
119 |
120 | # Spyder project settings
121 | .spyderproject
122 | .spyproject
123 |
124 | # Rope project settings
125 | .ropeproject
126 |
127 | # mkdocs documentation
128 | /site
129 |
130 | # mypy
131 | .mypy_cache/
132 | .dmypy.json
133 | dmypy.json
134 |
135 | # Pyre type checker
136 | .pyre/
137 |
138 | # pytype static type analyzer
139 | .pytype/
140 |
141 | # Cython debug symbols
142 | cython_debug/
143 |
144 |
145 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
146 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
147 |
148 | # User-specific stuff
149 | .idea/**/workspace.xml
150 | .idea/**/tasks.xml
151 | .idea/**/usage.statistics.xml
152 | .idea/**/dictionaries
153 | .idea/**/shelf
154 |
155 | # Generated files
156 | .idea/**/contentModel.xml
157 |
158 | # Sensitive or high-churn files
159 | .idea/**/dataSources/
160 | .idea/**/dataSources.ids
161 | .idea/**/dataSources.local.xml
162 | .idea/**/sqlDataSources.xml
163 | .idea/**/dynamic.xml
164 | .idea/**/uiDesigner.xml
165 | .idea/**/dbnavigator.xml
166 |
167 | # Gradle
168 | .idea/**/gradle.xml
169 | .idea/**/libraries
170 |
171 | # Gradle and Maven with auto-import
172 | # When using Gradle or Maven with auto-import, you should exclude module files,
173 | # since they will be recreated, and may cause churn. Uncomment if using
174 | # auto-import.
175 | # .idea/artifacts
176 | # .idea/compiler.xml
177 | # .idea/jarRepositories.xml
178 | # .idea/modules.xml
179 | # .idea/*.iml
180 | # .idea/modules
181 | # *.iml
182 | # *.ipr
183 |
184 | # CMake
185 | cmake-build-*/
186 |
187 | # Mongo Explorer plugin
188 | .idea/**/mongoSettings.xml
189 |
190 | # File-based project format
191 | *.iws
192 |
193 | # IntelliJ
194 | out/
195 |
196 | # mpeltonen/sbt-idea plugin
197 | .idea_modules/
198 |
199 | # JIRA plugin
200 | atlassian-ide-plugin.xml
201 |
202 | # Cursive Clojure plugin
203 | .idea/replstate.xml
204 |
205 | # Crashlytics plugin (for Android Studio and IntelliJ)
206 | com_crashlytics_export_strings.xml
207 | crashlytics.properties
208 | crashlytics-build.properties
209 | fabric.properties
210 |
211 | # Editor-based Rest Client
212 | .idea/httpRequests
213 |
214 | # Android studio 3.1+ serialized cache file
215 | .idea/caches/build_file_checksums.ser
--------------------------------------------------------------------------------
/python/app.py:
--------------------------------------------------------------------------------
1 | import json
2 |
3 | import six
4 | import werkzeug
5 | from flask import Flask, request, jsonify
6 | from flask_cors import CORS
7 | from werkzeug.utils import secure_filename
8 |
9 | import benchmark
10 | import libraries
11 | from web import charts
12 |
13 | app = Flask(__name__, static_folder=None)
14 | app.config['MAX_CONTENT_LENGTH'] = 1024 * 1024 * 2
15 | CORS(app) # todo: fix to receive only from https://jsonperf.com
16 |
17 | BNCH = benchmark.Benchmark(sorted(libraries.instantiate_libraries(), key=lambda l: l.name))
18 |
19 |
20 | def allowed_file(filename):
21 | return '.' in filename and \
22 | filename.rsplit('.', 1)[1].lower() in ['json', 'txt']
23 |
24 |
25 | @app.route("/python3", methods=["POST"])
26 | @app.route("/python2", methods=["POST"])
27 | def test():
28 | user_file = request.files.get('file') # type: werkzeug.datastructures.FileStorage
29 | if not user_file or user_file.filename == '':
30 | return 'file is missing', 400
31 |
32 | if not allowed_file(user_file.filename):
33 | return 'invalid file', 400
34 |
35 | filename = secure_filename(user_file.filename)
36 |
37 | # cl = request.content_length
38 | # if cl is not None and cl > 3 * 1024 * 1024:
39 | # abort(413)
40 |
41 | test_json = user_file.stream.read().decode('utf-8')
42 | if not test_json:
43 | return 'empty file', 400
44 |
45 | test_json = six.ensure_str(test_json)
46 |
47 | try:
48 | json.loads(test_json) # validate json
49 | except ValueError:
50 | return 'invalid json', 400
51 |
52 | results = [(filename, BNCH.run(test_json, 100, 1))] # todo: dynamic times
53 |
54 | chart_data = charts.from_results(results)
55 | return jsonify(chart_data)
56 |
57 |
58 | if __name__ == '__main__':
59 | app.run(debug=True)
60 |
--------------------------------------------------------------------------------
/python/benchmark.py:
--------------------------------------------------------------------------------
1 | import json
2 | import timeit
3 | from typing import List
4 |
5 | from libraries.serde_perf import SerdePerf
6 |
7 |
8 | class BenchmarkResult:
9 | def __init__(self, serialize, deserialize):
10 | # type: (float, float) -> None
11 | self.serialize = serialize
12 | self.deserialize = deserialize
13 |
14 |
15 | class Benchmark:
16 | TIMES = 10000
17 | REPEAT = 10
18 |
19 | def __init__(self, libraries):
20 | # type: (List[SerdePerf]) -> None
21 | self.libraries = libraries
22 |
23 | def run(self, test_json, times=TIMES, repeat=REPEAT):
24 | # type: (str, int, int) -> dict
25 | result = {}
26 | test_object = json.loads(test_json)
27 | for p in self.libraries:
28 | total_time_took = min(timeit.repeat(lambda: p.deserialize(test_json), number=times, repeat=repeat))
29 | deserialize_took_ms = total_time_took / times * 1000
30 |
31 | total_time_took = min(timeit.repeat(lambda: p.serialize(test_object), number=times, repeat=repeat))
32 | serialize_took_ms = total_time_took / times * 1000
33 |
34 | result[p.name_with_version] = BenchmarkResult(serialize_took_ms, deserialize_took_ms)
35 |
36 | return result
37 |
--------------------------------------------------------------------------------
/python/libraries/__init__.py:
--------------------------------------------------------------------------------
1 | import six
2 |
3 | from .rapidjson_perf import RapidJsonPerf
4 | from .simplejson_perf import SimpleJsonPerf
5 | from .stdjson_perf import StdJsonPerf
6 | from .ujson_perf import UJsonPerf
7 |
8 | if six.PY3:
9 | from .orjson_perf import OrJsonPerf
10 | __all__ = [OrJsonPerf, UJsonPerf, RapidJsonPerf, StdJsonPerf, SimpleJsonPerf]
11 | else:
12 | __all__ = [UJsonPerf, RapidJsonPerf, StdJsonPerf, SimpleJsonPerf]
13 |
14 |
15 | def instantiate_libraries():
16 | return [lib() for lib in __all__]
17 |
--------------------------------------------------------------------------------
/python/libraries/orjson_perf.py:
--------------------------------------------------------------------------------
1 | from .serde_perf import SerdePerf
2 | import orjson
3 |
4 |
5 | class OrJsonPerf(SerdePerf):
6 | name = "orjson"
7 | module = orjson
8 |
9 | def serialize(self, obj):
10 | # type: (object) -> None
11 | orjson.dumps(obj)
12 |
13 | def deserialize(self, jsn):
14 | # type: ([bytes, str]) -> None
15 | orjson.loads(jsn)
16 |
--------------------------------------------------------------------------------
/python/libraries/rapidjson_perf.py:
--------------------------------------------------------------------------------
1 | import rapidjson
2 | import six
3 |
4 | from libraries.serde_perf import SerdePerf
5 |
6 |
7 | class RapidJsonPerf(SerdePerf):
8 | name = "rapidjson"
9 | module = rapidjson
10 |
11 | @property
12 | def version(self):
13 | return super(RapidJsonPerf, self).version if six.PY3 else '0.5.1'
14 |
15 | def serialize(self, obj):
16 | # type: (object) -> None
17 | rapidjson.dumps(obj)
18 |
19 | def deserialize(self, jsn):
20 | # type: ([bytes, str]) -> None
21 | rapidjson.loads(jsn)
22 |
--------------------------------------------------------------------------------
/python/libraries/serde_perf.py:
--------------------------------------------------------------------------------
1 | from abc import ABCMeta, abstractmethod
2 |
3 | import six
4 |
5 |
6 | @six.add_metaclass(ABCMeta)
7 | class SerdePerf:
8 | @abstractmethod
9 | def serialize(self, obj):
10 | # type: (object) -> None
11 | pass
12 |
13 | @abstractmethod
14 | def deserialize(self, jsn):
15 | # type: ([bytes, str]) -> None
16 | pass
17 |
18 | @property
19 | @abstractmethod
20 | def name(self):
21 | pass
22 |
23 | @property
24 | @abstractmethod
25 | def module(self):
26 | pass
27 |
28 | @property
29 | def version(self):
30 | return self.module.__version__
31 |
32 | @property
33 | def name_with_version(self):
34 | return "{} {}".format(self.name, self.version)
35 |
--------------------------------------------------------------------------------
/python/libraries/simplejson_perf.py:
--------------------------------------------------------------------------------
1 | import simplejson
2 |
3 | from libraries.serde_perf import SerdePerf
4 |
5 |
6 | class SimpleJsonPerf(SerdePerf):
7 | name = "simplejson"
8 | module = simplejson
9 |
10 | def serialize(self, obj):
11 | # type: (object) -> None
12 | simplejson.dumps(obj)
13 |
14 | def deserialize(self, jsn):
15 | # type: ([bytes, str]) -> None
16 | simplejson.loads(jsn)
17 |
--------------------------------------------------------------------------------
/python/libraries/stdjson_perf.py:
--------------------------------------------------------------------------------
1 | from libraries.serde_perf import SerdePerf
2 | import json
3 |
4 |
5 | class StdJsonPerf(SerdePerf):
6 | name = "json"
7 | module = json
8 |
9 | def serialize(self, obj):
10 | # type: (object) -> None
11 | json.dumps(obj)
12 |
13 | def deserialize(self, jsn):
14 | # type: ([bytes, str]) -> None
15 | json.loads(jsn)
16 |
--------------------------------------------------------------------------------
/python/libraries/ujson_perf.py:
--------------------------------------------------------------------------------
1 | from libraries.serde_perf import SerdePerf
2 | import ujson
3 |
4 |
5 | class UJsonPerf(SerdePerf):
6 | name = "ujson"
7 | module = ujson
8 |
9 | def serialize(self, obj):
10 | # type: (object) -> None
11 | ujson.dumps(obj)
12 |
13 | def deserialize(self, jsn):
14 | # type: ([bytes, str]) -> None
15 | ujson.loads(jsn)
16 |
--------------------------------------------------------------------------------
/python/main.py:
--------------------------------------------------------------------------------
1 | import json
2 | from collections import OrderedDict
3 |
4 | import six
5 |
6 | if six.PY3:
7 | from pathlib import Path
8 | else:
9 | from pathlib2 import Path
10 |
11 | import benchmark
12 | import libraries
13 | from web import charts
14 |
15 | JSONS = OrderedDict([
16 | ("tiny (0 objects)", {"path": Path('../test_jsons/tiny.json'),
17 | "url": "https://github.com/ronlut/jsonperf/blob/master/test_jsons/tiny.json",
18 | "times": 1000}),
19 | ("small (1 object)", {"path": Path('../test_jsons/small.json'),
20 | "url": "https://github.com/ronlut/jsonperf/blob/master/test_jsons/small.json",
21 | "times": 1000}),
22 | ("medium (10 objects)", {"path": Path('../test_jsons/medium.json'),
23 | "url": "https://github.com/ronlut/jsonperf/blob/master/test_jsons/medium.json",
24 | "times": 100}),
25 | ("large (100 objects)", {"path": Path('../test_jsons/large.json'),
26 | "url": "https://github.com/ronlut/jsonperf/blob/master/test_jsons/large.json",
27 | "times": 100}),
28 | ("twitter (630 kb)", {"path": Path('../test_jsons/large.json'),
29 | "url": "https://github.com/ronlut/jsonperf/blob/master/test_jsons/twitter.json",
30 | "times": 100})
31 | ])
32 |
33 |
34 | def main():
35 | perfs = libraries.instantiate_libraries()
36 | perfs_ab_sorted = sorted(perfs, key=lambda l: l.name)
37 | bnch = benchmark.Benchmark(perfs_ab_sorted)
38 | results = []
39 | for title, config in JSONS.items():
40 | with config["path"].open('rt', encoding='utf-8') as f:
41 | cur_jsn = f.read()
42 |
43 | cur_jsn = six.ensure_str(cur_jsn) # this is needed for python 2
44 | result = bnch.run(cur_jsn, config.get("times"))
45 | results.append((title, result))
46 |
47 | chart_data = charts.from_results(results, urls=[config['url'] for config in JSONS.values()])
48 | with open('results.json', 'w') as f:
49 | json.dump(chart_data, f)
50 |
51 |
52 | if __name__ == '__main__':
53 | main()
54 |
--------------------------------------------------------------------------------
/python/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "serdeperf",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "keywords": [],
10 | "author": "",
11 | "license": "ISC",
12 | "devDependencies": {
13 | "serverless-python-requirements": "^5.1.0",
14 | "serverless-wsgi": "^1.7.5"
15 | },
16 | "dependencies": {}
17 | }
18 |
--------------------------------------------------------------------------------
/python/requirements_py2.txt:
--------------------------------------------------------------------------------
1 | pyrapidjson==0.5.1
2 | simplejson==3.17.2
3 | ujson==2.0.3
4 | Flask==1.1.2
5 | Flask-Cors==3.0.8
6 | pathlib2==2.3.5
7 | six==1.15.0
8 | typing==3.7.4.3
9 | pytz==2020.1
--------------------------------------------------------------------------------
/python/requirements_py3.txt:
--------------------------------------------------------------------------------
1 | orjson==3.4.6
2 | python-rapidjson==1.0
3 | simplejson==3.17.2
4 | ujson==4.0.1
5 | Flask==1.1.2
6 | Flask-Cors==3.0.8
7 | six==1.15.0
8 | pytz==2020.1
9 |
--------------------------------------------------------------------------------
/python/serverless_py2.yml:
--------------------------------------------------------------------------------
1 | service: python2
2 |
3 | plugins:
4 | - serverless-python-requirements
5 | - serverless-wsgi
6 |
7 | package:
8 | exclude:
9 | - 'venv*/**'
10 |
11 | custom:
12 | stage: ${opt:stage, self:provider.stage}
13 | wsgi:
14 | app: app.app
15 | packRequirements: false
16 | pythonRequirements:
17 | fileName: requirements_py2.txt
18 | dockerizePip: non-linux
19 | slim: true
20 |
21 | provider:
22 | name: aws
23 | stage: dev
24 | region: us-east-1
25 | runtime: python2.7
26 | apiGateway:
27 | restApiId:
28 | 'Fn::ImportValue': LanguagesApiGw-restApiId-${self:custom.stage}
29 | restApiRootResourceId:
30 | 'Fn::ImportValue': LanguagesApiGw-rootResourceId-${self:custom.stage}
31 |
32 | functions:
33 | python2:
34 | handler: wsgi_handler.handler
35 | events:
36 | - http:
37 | method: post
38 | path: /python2
39 | cors: false
40 |
--------------------------------------------------------------------------------
/python/serverless_py3.yml:
--------------------------------------------------------------------------------
1 | service: python3
2 |
3 | plugins:
4 | - serverless-python-requirements
5 | - serverless-wsgi
6 |
7 | package:
8 | exclude:
9 | - 'venv*/**'
10 |
11 | custom:
12 | stage: ${opt:stage, self:provider.stage}
13 | wsgi:
14 | app: app.app
15 | packRequirements: false
16 | pythonRequirements:
17 | fileName: requirements_py3.txt
18 | dockerizePip: non-linux
19 | slim: true
20 |
21 | provider:
22 | name: aws
23 | stage: dev
24 | region: us-east-1
25 | runtime: python3.8
26 | apiGateway:
27 | restApiId:
28 | 'Fn::ImportValue': LanguagesApiGw-restApiId-${self:custom.stage}
29 | restApiRootResourceId:
30 | 'Fn::ImportValue': LanguagesApiGw-rootResourceId-${self:custom.stage}
31 |
32 | functions:
33 | python3:
34 | handler: wsgi_handler.handler
35 | events:
36 | - http:
37 | method: post
38 | path: /python3
39 | cors: false
40 |
--------------------------------------------------------------------------------
/python/tests/test_serde.py:
--------------------------------------------------------------------------------
1 | def test_placeholder():
2 | pass
3 |
--------------------------------------------------------------------------------
/python/web/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ronlut/jsonperf/f50ff237e9c42ed61aa89f823a5b43290371dbf5/python/web/__init__.py
--------------------------------------------------------------------------------
/python/web/charts.py:
--------------------------------------------------------------------------------
1 | import datetime
2 | import pytz
3 | from typing import List, Tuple, Optional
4 |
5 | from benchmark import BenchmarkResult
6 |
7 |
8 | def from_results(results, urls=None, precision_format="{:.5f}"):
9 | # type: (List[Tuple[str, dict]], list, str) -> List[dict]
10 | if not urls:
11 | urls = [None] * len(results)
12 |
13 | charts = []
14 |
15 | for i, ((title, json_results), url) in enumerate(zip(results, urls)):
16 | chart = Chart(title, url=url, precision_format=precision_format)
17 |
18 | for lib_name, benchmark_result in json_results.items():
19 | chart.add_lib_result(lib_name, benchmark_result)
20 |
21 | charts.append({k: v for k, v in chart.__dict__.items() if not k.startswith('_')})
22 |
23 | return charts
24 |
25 |
26 | class Chart:
27 | def __init__(self, title="", timestamp=None, url=None, precision_format="{:.5f}"):
28 | # type: (str, datetime, Optional[datetime.datetime], str) -> None
29 | if timestamp is None:
30 | timestamp = datetime.datetime.now(pytz.utc)
31 | if url is not None:
32 | self.url = url
33 |
34 | self.title = title
35 | self.timestamp_s = int((timestamp - datetime.datetime(1970, 1, 1, tzinfo=pytz.utc)).total_seconds())
36 | self.data = [
37 | ["test"],
38 | ["serialize"],
39 | ["deserialize"]
40 | ]
41 | self._precision_format = precision_format
42 |
43 | def add_lib_result(self, name, result):
44 | # type: (str, BenchmarkResult) -> None
45 | self.data[0].append(name)
46 | self.data[1].append(self._precision_format.format(result.serialize))
47 | self.data[2].append(self._precision_format.format(result.deserialize))
48 |
--------------------------------------------------------------------------------
/python/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | "@iarna/toml@^2.2.3":
6 | version "2.2.5"
7 | resolved "https://registry.yarnpkg.com/@iarna/toml/-/toml-2.2.5.tgz#b32366c89b43c6f8cefbdefac778b9c828e3ba8c"
8 | integrity sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg==
9 |
10 | "@types/color-name@^1.1.1":
11 | version "1.1.1"
12 | resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
13 | integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==
14 |
15 | ansi-regex@^5.0.0:
16 | version "5.0.0"
17 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
18 | integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
19 |
20 | ansi-styles@^4.0.0:
21 | version "4.2.1"
22 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359"
23 | integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==
24 | dependencies:
25 | "@types/color-name" "^1.1.1"
26 | color-convert "^2.0.1"
27 |
28 | appdirectory@^0.1.0:
29 | version "0.1.0"
30 | resolved "https://registry.yarnpkg.com/appdirectory/-/appdirectory-0.1.0.tgz#eb6c816320e7b2ab16f5ed997f28d8205df56375"
31 | integrity sha1-62yBYyDnsqsW9e2ZfyjYIF31Y3U=
32 |
33 | async@~1.5:
34 | version "1.5.2"
35 | resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
36 | integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=
37 |
38 | at-least-node@^1.0.0:
39 | version "1.0.0"
40 | resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2"
41 | integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==
42 |
43 | balanced-match@^1.0.0:
44 | version "1.0.0"
45 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
46 | integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
47 |
48 | bluebird@^3.0.6, bluebird@^3.7.2:
49 | version "3.7.2"
50 | resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
51 | integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==
52 |
53 | brace-expansion@^1.1.7:
54 | version "1.1.11"
55 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
56 | integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
57 | dependencies:
58 | balanced-match "^1.0.0"
59 | concat-map "0.0.1"
60 |
61 | camelcase@^5.0.0:
62 | version "5.3.1"
63 | resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320"
64 | integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
65 |
66 | cliui@^6.0.0:
67 | version "6.0.0"
68 | resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1"
69 | integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==
70 | dependencies:
71 | string-width "^4.2.0"
72 | strip-ansi "^6.0.0"
73 | wrap-ansi "^6.2.0"
74 |
75 | color-convert@^2.0.1:
76 | version "2.0.1"
77 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
78 | integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
79 | dependencies:
80 | color-name "~1.1.4"
81 |
82 | color-name@~1.1.4:
83 | version "1.1.4"
84 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
85 | integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
86 |
87 | concat-map@0.0.1:
88 | version "0.0.1"
89 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
90 | integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
91 |
92 | core-util-is@~1.0.0:
93 | version "1.0.2"
94 | resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
95 | integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
96 |
97 | decamelize@^1.2.0:
98 | version "1.2.0"
99 | resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
100 | integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=
101 |
102 | emoji-regex@^8.0.0:
103 | version "8.0.0"
104 | resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
105 | integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
106 |
107 | find-up@^4.1.0:
108 | version "4.1.0"
109 | resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19"
110 | integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==
111 | dependencies:
112 | locate-path "^5.0.0"
113 | path-exists "^4.0.0"
114 |
115 | fs-extra@^7.0.0:
116 | version "7.0.1"
117 | resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9"
118 | integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==
119 | dependencies:
120 | graceful-fs "^4.1.2"
121 | jsonfile "^4.0.0"
122 | universalify "^0.1.0"
123 |
124 | fs-extra@^9.0.0:
125 | version "9.0.1"
126 | resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.0.1.tgz#910da0062437ba4c39fedd863f1675ccfefcb9fc"
127 | integrity sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==
128 | dependencies:
129 | at-least-node "^1.0.0"
130 | graceful-fs "^4.2.0"
131 | jsonfile "^6.0.1"
132 | universalify "^1.0.0"
133 |
134 | fs.realpath@^1.0.0:
135 | version "1.0.0"
136 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
137 | integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
138 |
139 | get-caller-file@^2.0.1:
140 | version "2.0.5"
141 | resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
142 | integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
143 |
144 | glob-all@^3.1.0:
145 | version "3.2.1"
146 | resolved "https://registry.yarnpkg.com/glob-all/-/glob-all-3.2.1.tgz#082ca81afd2247cbd3ed2149bb2630f4dc877d95"
147 | integrity sha512-x877rVkzB3ipid577QOp+eQCR6M5ZyiwrtaYgrX/z3EThaSPFtLDwBXFHc3sH1cG0R0vFYI5SRYeWMMSEyXkUw==
148 | dependencies:
149 | glob "^7.1.2"
150 | yargs "^15.3.1"
151 |
152 | glob@^7.1.2, glob@^7.1.3:
153 | version "7.1.6"
154 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
155 | integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
156 | dependencies:
157 | fs.realpath "^1.0.0"
158 | inflight "^1.0.4"
159 | inherits "2"
160 | minimatch "^3.0.4"
161 | once "^1.3.0"
162 | path-is-absolute "^1.0.0"
163 |
164 | graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0:
165 | version "4.2.4"
166 | resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb"
167 | integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==
168 |
169 | hasbin@^1.2.3:
170 | version "1.2.3"
171 | resolved "https://registry.yarnpkg.com/hasbin/-/hasbin-1.2.3.tgz#78c5926893c80215c2b568ae1fd3fcab7a2696b0"
172 | integrity sha1-eMWSaJPIAhXCtWiuH9P8q3omlrA=
173 | dependencies:
174 | async "~1.5"
175 |
176 | immediate@~3.0.5:
177 | version "3.0.6"
178 | resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b"
179 | integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps=
180 |
181 | inflight@^1.0.4:
182 | version "1.0.6"
183 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
184 | integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
185 | dependencies:
186 | once "^1.3.0"
187 | wrappy "1"
188 |
189 | inherits@2, inherits@~2.0.3:
190 | version "2.0.4"
191 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
192 | integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
193 |
194 | is-docker@^2.0.0:
195 | version "2.1.1"
196 | resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.1.1.tgz#4125a88e44e450d384e09047ede71adc2d144156"
197 | integrity sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==
198 |
199 | is-fullwidth-code-point@^3.0.0:
200 | version "3.0.0"
201 | resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
202 | integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
203 |
204 | is-wsl@^2.0.0:
205 | version "2.2.0"
206 | resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271"
207 | integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==
208 | dependencies:
209 | is-docker "^2.0.0"
210 |
211 | isarray@~1.0.0:
212 | version "1.0.0"
213 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
214 | integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
215 |
216 | jsonfile@^4.0.0:
217 | version "4.0.0"
218 | resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
219 | integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=
220 | optionalDependencies:
221 | graceful-fs "^4.1.6"
222 |
223 | jsonfile@^6.0.1:
224 | version "6.0.1"
225 | resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.0.1.tgz#98966cba214378c8c84b82e085907b40bf614179"
226 | integrity sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg==
227 | dependencies:
228 | universalify "^1.0.0"
229 | optionalDependencies:
230 | graceful-fs "^4.1.6"
231 |
232 | jszip@^3.1.0:
233 | version "3.5.0"
234 | resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.5.0.tgz#b4fd1f368245346658e781fec9675802489e15f6"
235 | integrity sha512-WRtu7TPCmYePR1nazfrtuF216cIVon/3GWOvHS9QR5bIwSbnxtdpma6un3jyGGNhHsKCSzn5Ypk+EkDRvTGiFA==
236 | dependencies:
237 | lie "~3.3.0"
238 | pako "~1.0.2"
239 | readable-stream "~2.3.6"
240 | set-immediate-shim "~1.0.1"
241 |
242 | lie@~3.3.0:
243 | version "3.3.0"
244 | resolved "https://registry.yarnpkg.com/lie/-/lie-3.3.0.tgz#dcf82dee545f46074daf200c7c1c5a08e0f40f6a"
245 | integrity sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==
246 | dependencies:
247 | immediate "~3.0.5"
248 |
249 | locate-path@^5.0.0:
250 | version "5.0.0"
251 | resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0"
252 | integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==
253 | dependencies:
254 | p-locate "^4.1.0"
255 |
256 | lodash.get@^4.4.2:
257 | version "4.4.2"
258 | resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
259 | integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=
260 |
261 | lodash.set@^4.3.2:
262 | version "4.3.2"
263 | resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23"
264 | integrity sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=
265 |
266 | lodash.uniqby@^4.0.0:
267 | version "4.7.0"
268 | resolved "https://registry.yarnpkg.com/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz#d99c07a669e9e6d24e1362dfe266c67616af1302"
269 | integrity sha1-2ZwHpmnp5tJOE2Lf4mbGdhavEwI=
270 |
271 | lodash.values@^4.3.0:
272 | version "4.3.0"
273 | resolved "https://registry.yarnpkg.com/lodash.values/-/lodash.values-4.3.0.tgz#a3a6c2b0ebecc5c2cba1c17e6e620fe81b53d347"
274 | integrity sha1-o6bCsOvsxcLLocF+bmIP6BtT00c=
275 |
276 | lodash@^4.17.15:
277 | version "4.17.20"
278 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52"
279 | integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==
280 |
281 | minimatch@^3.0.4:
282 | version "3.0.4"
283 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
284 | integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
285 | dependencies:
286 | brace-expansion "^1.1.7"
287 |
288 | once@^1.3.0:
289 | version "1.4.0"
290 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
291 | integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
292 | dependencies:
293 | wrappy "1"
294 |
295 | p-limit@^2.2.0:
296 | version "2.3.0"
297 | resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1"
298 | integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==
299 | dependencies:
300 | p-try "^2.0.0"
301 |
302 | p-locate@^4.1.0:
303 | version "4.1.0"
304 | resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07"
305 | integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==
306 | dependencies:
307 | p-limit "^2.2.0"
308 |
309 | p-try@^2.0.0:
310 | version "2.2.0"
311 | resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6"
312 | integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==
313 |
314 | pako@~1.0.2:
315 | version "1.0.11"
316 | resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf"
317 | integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==
318 |
319 | path-exists@^4.0.0:
320 | version "4.0.0"
321 | resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3"
322 | integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==
323 |
324 | path-is-absolute@^1.0.0:
325 | version "1.0.1"
326 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
327 | integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
328 |
329 | process-nextick-args@~2.0.0:
330 | version "2.0.1"
331 | resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
332 | integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==
333 |
334 | readable-stream@~2.3.6:
335 | version "2.3.7"
336 | resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
337 | integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==
338 | dependencies:
339 | core-util-is "~1.0.0"
340 | inherits "~2.0.3"
341 | isarray "~1.0.0"
342 | process-nextick-args "~2.0.0"
343 | safe-buffer "~5.1.1"
344 | string_decoder "~1.1.1"
345 | util-deprecate "~1.0.1"
346 |
347 | require-directory@^2.1.1:
348 | version "2.1.1"
349 | resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
350 | integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I=
351 |
352 | require-main-filename@^2.0.0:
353 | version "2.0.0"
354 | resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b"
355 | integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==
356 |
357 | rimraf@^3.0.2:
358 | version "3.0.2"
359 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a"
360 | integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==
361 | dependencies:
362 | glob "^7.1.3"
363 |
364 | safe-buffer@~5.1.0, safe-buffer@~5.1.1:
365 | version "5.1.2"
366 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
367 | integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
368 |
369 | serverless-python-requirements@^5.1.0:
370 | version "5.1.0"
371 | resolved "https://registry.yarnpkg.com/serverless-python-requirements/-/serverless-python-requirements-5.1.0.tgz#5ce0ee1158429c8304a45a753100511517ea8fa9"
372 | integrity sha512-lJhikc6wJsOYFxYNGK763xtQITrtGPHD2KJvs8qaBkkOET4RVk8E0N3d8wAO22k+Tk7N6a6Jonnvsmo3W8vtCA==
373 | dependencies:
374 | "@iarna/toml" "^2.2.3"
375 | appdirectory "^0.1.0"
376 | bluebird "^3.0.6"
377 | fs-extra "^7.0.0"
378 | glob-all "^3.1.0"
379 | is-wsl "^2.0.0"
380 | jszip "^3.1.0"
381 | lodash.get "^4.4.2"
382 | lodash.set "^4.3.2"
383 | lodash.uniqby "^4.0.0"
384 | lodash.values "^4.3.0"
385 | rimraf "^3.0.2"
386 | sha256-file "1.0.0"
387 | shell-quote "^1.6.1"
388 |
389 | serverless-wsgi@^1.7.5:
390 | version "1.7.5"
391 | resolved "https://registry.yarnpkg.com/serverless-wsgi/-/serverless-wsgi-1.7.5.tgz#7598437bd574e1999c4adee92e877ab99cb97637"
392 | integrity sha512-6a+rHqAemAJuZiH9ecqwoigiVZKuATIxJft0CUWAxXwietzg0BkSowcUKcfah+fbjgSQks7LDl8B+xe8Kb7waA==
393 | dependencies:
394 | bluebird "^3.7.2"
395 | fs-extra "^9.0.0"
396 | hasbin "^1.2.3"
397 | lodash "^4.17.15"
398 |
399 | set-blocking@^2.0.0:
400 | version "2.0.0"
401 | resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
402 | integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc=
403 |
404 | set-immediate-shim@~1.0.1:
405 | version "1.0.1"
406 | resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61"
407 | integrity sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=
408 |
409 | sha256-file@1.0.0:
410 | version "1.0.0"
411 | resolved "https://registry.yarnpkg.com/sha256-file/-/sha256-file-1.0.0.tgz#02cade5e658da3fbc167c3270bdcdfd5409f1b65"
412 | integrity sha512-nqf+g0veqgQAkDx0U2y2Tn2KWyADuuludZTw9A7J3D+61rKlIIl9V5TS4mfnwKuXZOH9B7fQyjYJ9pKRHIsAyg==
413 |
414 | shell-quote@^1.6.1:
415 | version "1.7.2"
416 | resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.2.tgz#67a7d02c76c9da24f99d20808fcaded0e0e04be2"
417 | integrity sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==
418 |
419 | string-width@^4.1.0, string-width@^4.2.0:
420 | version "4.2.0"
421 | resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5"
422 | integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==
423 | dependencies:
424 | emoji-regex "^8.0.0"
425 | is-fullwidth-code-point "^3.0.0"
426 | strip-ansi "^6.0.0"
427 |
428 | string_decoder@~1.1.1:
429 | version "1.1.1"
430 | resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
431 | integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==
432 | dependencies:
433 | safe-buffer "~5.1.0"
434 |
435 | strip-ansi@^6.0.0:
436 | version "6.0.0"
437 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532"
438 | integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==
439 | dependencies:
440 | ansi-regex "^5.0.0"
441 |
442 | universalify@^0.1.0:
443 | version "0.1.2"
444 | resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
445 | integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==
446 |
447 | universalify@^1.0.0:
448 | version "1.0.0"
449 | resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d"
450 | integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==
451 |
452 | util-deprecate@~1.0.1:
453 | version "1.0.2"
454 | resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
455 | integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
456 |
457 | which-module@^2.0.0:
458 | version "2.0.0"
459 | resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a"
460 | integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=
461 |
462 | wrap-ansi@^6.2.0:
463 | version "6.2.0"
464 | resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53"
465 | integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==
466 | dependencies:
467 | ansi-styles "^4.0.0"
468 | string-width "^4.1.0"
469 | strip-ansi "^6.0.0"
470 |
471 | wrappy@1:
472 | version "1.0.2"
473 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
474 | integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
475 |
476 | y18n@^4.0.0:
477 | version "4.0.0"
478 | resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b"
479 | integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==
480 |
481 | yargs-parser@^18.1.2:
482 | version "18.1.3"
483 | resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0"
484 | integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==
485 | dependencies:
486 | camelcase "^5.0.0"
487 | decamelize "^1.2.0"
488 |
489 | yargs@^15.3.1:
490 | version "15.4.1"
491 | resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8"
492 | integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==
493 | dependencies:
494 | cliui "^6.0.0"
495 | decamelize "^1.2.0"
496 | find-up "^4.1.0"
497 | get-caller-file "^2.0.1"
498 | require-directory "^2.1.1"
499 | require-main-filename "^2.0.0"
500 | set-blocking "^2.0.0"
501 | string-width "^4.2.0"
502 | which-module "^2.0.0"
503 | y18n "^4.0.0"
504 | yargs-parser "^18.1.2"
505 |
--------------------------------------------------------------------------------
/serverless.yml:
--------------------------------------------------------------------------------
1 | service: api
2 |
3 | custom:
4 | stage: ${opt:stage, self:provider.stage}
5 |
6 | provider:
7 | name: aws
8 | stage: dev
9 | region: us-east-1
10 |
11 | resources:
12 | Resources:
13 | LanguagesApiGw:
14 | Type: AWS::ApiGateway::RestApi
15 | Properties:
16 | Name: LanguagesApiGw-${self:custom.stage}
17 |
18 | Outputs:
19 | apiGatewayRestApiId:
20 | Value:
21 | Ref: LanguagesApiGw
22 | Export:
23 | Name: LanguagesApiGw-restApiId-${self:custom.stage}
24 |
25 | apiGatewayRestApiRootResourceId:
26 | Value:
27 | Fn::GetAtt:
28 | - LanguagesApiGw
29 | - RootResourceId
30 | Export:
31 | Name: LanguagesApiGw-rootResourceId-${self:custom.stage}
32 |
--------------------------------------------------------------------------------
/test_jsons/medium.json:
--------------------------------------------------------------------------------
1 | {
2 | "users": [
3 | {
4 | "id": "5f6dc0855a353381a2b1413e",
5 | "index": 0,
6 | "guid": "2a5192ca-86f0-4305-bb54-5b852e3611a0",
7 | "isActive": true,
8 | "balance": "$1,642.21",
9 | "picture": "http://placehold.it/32x32",
10 | "age": 22,
11 | "eyeColor": 2,
12 | "name": {
13 | "first": "Emilia",
14 | "last": "Rowland"
15 | },
16 | "company": "GEEKWAGON",
17 | "email": "emilia.rowland@geekwagon.us",
18 | "phone": "+1 (985) 452-2577",
19 | "address": "334 Varick Avenue, Hampstead, Arkansas, 1236",
20 | "about": "Cillum consequat enim eu consequat tempor incididunt et aliqua do deserunt adipisicing. Non enim irure ut id excepteur. Et cupidatat mollit deserunt culpa non culpa adipisicing sit aliquip anim cillum. Tempor do reprehenderit irure in sint proident dolor. Magna esse fugiat sit pariatur elit duis voluptate nulla id. Magna aute in amet cupidatat aute nostrud anim et qui. Excepteur sunt do minim labore esse.",
21 | "registered": "Sunday, July 5, 2020 9:02 PM",
22 | "latitude": "50.334586",
23 | "longitude": "-118.536832",
24 | "tags": [
25 | "consequat",
26 | "laboris",
27 | "occaecat",
28 | "amet",
29 | "labore"
30 | ],
31 | "range": [
32 | 0,
33 | 1,
34 | 2,
35 | 3,
36 | 4,
37 | 5,
38 | 6,
39 | 7,
40 | 8,
41 | 9
42 | ],
43 | "friends": [
44 | {
45 | "id": 0,
46 | "name": "Madelyn Kim"
47 | },
48 | {
49 | "id": 1,
50 | "name": "Florence Powers"
51 | },
52 | {
53 | "id": 2,
54 | "name": "Sonja Beard"
55 | }
56 | ],
57 | "greeting": "Hello, Emilia! You have 7 unread messages.",
58 | "favoriteFruit": "banana"
59 | },
60 | {
61 | "id": "5f6dc0857ba55e834539f649",
62 | "index": 1,
63 | "guid": "2dfd2188-8fb3-44f7-84b2-6288c04769bb",
64 | "isActive": true,
65 | "balance": "$3,891.75",
66 | "picture": "http://placehold.it/32x32",
67 | "age": 23,
68 | "eyeColor": 1,
69 | "name": {
70 | "first": "Latonya",
71 | "last": "Marks"
72 | },
73 | "company": "COMDOM",
74 | "email": "latonya.marks@comdom.biz",
75 | "phone": "+1 (861) 556-3183",
76 | "address": "287 Troy Avenue, Lloyd, North Dakota, 3060",
77 | "about": "Sint cillum elit cupidatat labore ad culpa dolore non cupidatat. Occaecat eu non consequat minim ea esse. Duis incididunt Lorem consectetur ad incididunt. Cupidatat sunt non do deserunt do voluptate cillum ex aliqua laborum. Quis consequat et laboris culpa id eiusmod labore Lorem voluptate. Ipsum dolore incididunt sint duis nisi.",
78 | "registered": "Saturday, July 15, 2017 1:06 AM",
79 | "latitude": "80.76638",
80 | "longitude": "-24.151469",
81 | "tags": [
82 | "proident",
83 | "ad",
84 | "amet",
85 | "nostrud",
86 | "nulla"
87 | ],
88 | "range": [
89 | 0,
90 | 1,
91 | 2,
92 | 3,
93 | 4,
94 | 5,
95 | 6,
96 | 7,
97 | 8,
98 | 9
99 | ],
100 | "friends": [
101 | {
102 | "id": 0,
103 | "name": "Bailey Good"
104 | },
105 | {
106 | "id": 1,
107 | "name": "Slater Osborne"
108 | },
109 | {
110 | "id": 2,
111 | "name": "Camille Dillard"
112 | }
113 | ],
114 | "greeting": "Hello, Latonya! You have 8 unread messages.",
115 | "favoriteFruit": "banana"
116 | },
117 | {
118 | "id": "5f6dc08568969ab4732ecc96",
119 | "index": 2,
120 | "guid": "36dd7448-c9a3-4d6f-a903-75817b8b638c",
121 | "isActive": true,
122 | "balance": "$2,908.80",
123 | "picture": "http://placehold.it/32x32",
124 | "age": 37,
125 | "eyeColor": 2,
126 | "name": {
127 | "first": "Cash",
128 | "last": "Salas"
129 | },
130 | "company": "MAGMINA",
131 | "email": "cash.salas@magmina.com",
132 | "phone": "+1 (869) 490-3017",
133 | "address": "366 Bedell Lane, Veyo, South Carolina, 5649",
134 | "about": "Aliquip irure eiusmod do tempor consequat elit eu. Anim in incididunt consequat aliquip est proident. Pariatur id aute nostrud sit sint qui minim magna sunt commodo consequat irure voluptate.",
135 | "registered": "Wednesday, April 29, 2015 4:40 AM",
136 | "latitude": "-31.894907",
137 | "longitude": "-116.898777",
138 | "tags": [
139 | "et",
140 | "eu",
141 | "sint",
142 | "pariatur",
143 | "reprehenderit"
144 | ],
145 | "range": [
146 | 0,
147 | 1,
148 | 2,
149 | 3,
150 | 4,
151 | 5,
152 | 6,
153 | 7,
154 | 8,
155 | 9
156 | ],
157 | "friends": [
158 | {
159 | "id": 0,
160 | "name": "Kirk Morrow"
161 | },
162 | {
163 | "id": 1,
164 | "name": "Cantrell Hopper"
165 | },
166 | {
167 | "id": 2,
168 | "name": "Acosta Leach"
169 | }
170 | ],
171 | "greeting": "Hello, Cash! You have 6 unread messages.",
172 | "favoriteFruit": "banana"
173 | },
174 | {
175 | "id": "5f6dc08595ea9e19e4050d34",
176 | "index": 3,
177 | "guid": "6a014646-ead0-4db6-bc9d-ac128054aad5",
178 | "isActive": false,
179 | "balance": "$2,397.19",
180 | "picture": "http://placehold.it/32x32",
181 | "age": 31,
182 | "eyeColor": 2,
183 | "name": {
184 | "first": "Dixie",
185 | "last": "Pope"
186 | },
187 | "company": "MEMORA",
188 | "email": "dixie.pope@memora.io",
189 | "phone": "+1 (919) 410-3276",
190 | "address": "298 Neptune Court, Trinway, Minnesota, 7106",
191 | "about": "Veniam eiusmod tempor id anim veniam occaecat aliqua minim cupidatat. Labore ut laborum sit commodo officia laboris occaecat amet in consequat ex aliqua officia. Eiusmod et amet cillum tempor proident consectetur dolore id dolor veniam aliqua officia. Duis excepteur est aliquip sit exercitation labore irure eu ad laborum ea occaecat qui.",
192 | "registered": "Thursday, August 9, 2018 5:29 PM",
193 | "latitude": "33.351923",
194 | "longitude": "10.956268",
195 | "tags": [
196 | "proident",
197 | "aliquip",
198 | "non",
199 | "ullamco",
200 | "quis"
201 | ],
202 | "range": [
203 | 0,
204 | 1,
205 | 2,
206 | 3,
207 | 4,
208 | 5,
209 | 6,
210 | 7,
211 | 8,
212 | 9
213 | ],
214 | "friends": [
215 | {
216 | "id": 0,
217 | "name": "Jannie Coleman"
218 | },
219 | {
220 | "id": 1,
221 | "name": "Goldie Weber"
222 | },
223 | {
224 | "id": 2,
225 | "name": "Donovan Hoffman"
226 | }
227 | ],
228 | "greeting": "Hello, Dixie! You have 10 unread messages.",
229 | "favoriteFruit": "strawberry"
230 | },
231 | {
232 | "id": "5f6dc0855a9dc88a39f48037",
233 | "index": 4,
234 | "guid": "ea613ab0-5af0-429d-90af-1960369aba5c",
235 | "isActive": true,
236 | "balance": "$1,691.11",
237 | "picture": "http://placehold.it/32x32",
238 | "age": 37,
239 | "eyeColor": 2,
240 | "name": {
241 | "first": "Marjorie",
242 | "last": "Prince"
243 | },
244 | "company": "QUILITY",
245 | "email": "marjorie.prince@quility.co.uk",
246 | "phone": "+1 (944) 500-2108",
247 | "address": "168 Coffey Street, Cornfields, Alaska, 7591",
248 | "about": "Deserunt aute sint anim consectetur velit sunt veniam do. Qui laboris ex sint dolor adipisicing cupidatat in elit occaecat irure. Incididunt sit irure est proident dolor anim duis. Et adipisicing id ex dolor sit non fugiat aliqua eu do Lorem dolore anim nostrud. Ullamco ut enim excepteur cillum sunt cupidatat ipsum. Sunt ipsum incididunt qui elit irure.",
249 | "registered": "Monday, January 30, 2017 7:33 PM",
250 | "latitude": "-73.728152",
251 | "longitude": "-136.138094",
252 | "tags": [
253 | "incididunt",
254 | "irure",
255 | "sunt",
256 | "voluptate",
257 | "ut"
258 | ],
259 | "range": [
260 | 0,
261 | 1,
262 | 2,
263 | 3,
264 | 4,
265 | 5,
266 | 6,
267 | 7,
268 | 8,
269 | 9
270 | ],
271 | "friends": [
272 | {
273 | "id": 0,
274 | "name": "Stone Ellison"
275 | },
276 | {
277 | "id": 1,
278 | "name": "Snow Carney"
279 | },
280 | {
281 | "id": 2,
282 | "name": "Hensley Molina"
283 | }
284 | ],
285 | "greeting": "Hello, Marjorie! You have 7 unread messages.",
286 | "favoriteFruit": "strawberry"
287 | },
288 | {
289 | "id": "5f6dc08595e97ef82db29ff6",
290 | "index": 5,
291 | "guid": "f7e2033e-317f-4474-b4df-26167a4005a3",
292 | "isActive": false,
293 | "balance": "$3,645.37",
294 | "picture": "http://placehold.it/32x32",
295 | "age": 23,
296 | "eyeColor": 0,
297 | "name": {
298 | "first": "Carey",
299 | "last": "Greer"
300 | },
301 | "company": "MONDICIL",
302 | "email": "carey.greer@mondicil.org",
303 | "phone": "+1 (914) 546-3362",
304 | "address": "905 Liberty Avenue, Bellamy, Marshall Islands, 1403",
305 | "about": "Consequat ipsum Lorem veniam labore minim dolor est nulla cillum minim. Fugiat ex sunt labore ex Lorem cillum est nostrud reprehenderit sint et do. Deserunt esse adipisicing voluptate magna reprehenderit nulla consequat voluptate laboris non et. Incididunt consequat adipisicing incididunt cupidatat nulla incididunt. Id Lorem enim commodo consequat laboris consequat ad eiusmod reprehenderit ipsum et ullamco veniam.",
306 | "registered": "Friday, May 3, 2019 4:42 PM",
307 | "latitude": "32.713683",
308 | "longitude": "126.746143",
309 | "tags": [
310 | "culpa",
311 | "fugiat",
312 | "laboris",
313 | "tempor",
314 | "incididunt"
315 | ],
316 | "range": [
317 | 0,
318 | 1,
319 | 2,
320 | 3,
321 | 4,
322 | 5,
323 | 6,
324 | 7,
325 | 8,
326 | 9
327 | ],
328 | "friends": [
329 | {
330 | "id": 0,
331 | "name": "Mcconnell Bass"
332 | },
333 | {
334 | "id": 1,
335 | "name": "Taylor Keller"
336 | },
337 | {
338 | "id": 2,
339 | "name": "Luisa Ryan"
340 | }
341 | ],
342 | "greeting": "Hello, Carey! You have 6 unread messages.",
343 | "favoriteFruit": "banana"
344 | },
345 | {
346 | "id": "5f6dc085a08fb1685492d4c9",
347 | "index": 6,
348 | "guid": "f01e9cd1-2d50-406b-a7c9-71e9740062b8",
349 | "isActive": true,
350 | "balance": "$2,864.54",
351 | "picture": "http://placehold.it/32x32",
352 | "age": 38,
353 | "eyeColor": 0,
354 | "name": {
355 | "first": "Le",
356 | "last": "Sherman"
357 | },
358 | "company": "SUSTENZA",
359 | "email": "le.sherman@sustenza.ca",
360 | "phone": "+1 (989) 481-2638",
361 | "address": "691 Brightwater Avenue, Kohatk, Tennessee, 9122",
362 | "about": "Lorem qui sunt deserunt sunt ullamco. Ad adipisicing cillum et amet et consequat dolor quis. Esse voluptate sit sint elit nostrud deserunt exercitation ea voluptate et quis magna commodo. Cupidatat magna non anim laborum anim eiusmod qui non est ipsum Lorem minim. Velit elit minim velit amet sint ut et anim veniam dolore occaecat deserunt ex consequat. Officia et eiusmod consectetur commodo esse Lorem ipsum pariatur nostrud fugiat excepteur culpa excepteur nostrud. Sit qui eu aute in et fugiat adipisicing.",
363 | "registered": "Sunday, August 16, 2015 2:31 AM",
364 | "latitude": "4.047135",
365 | "longitude": "132.008011",
366 | "tags": [
367 | "laboris",
368 | "et",
369 | "qui",
370 | "reprehenderit",
371 | "aliqua"
372 | ],
373 | "range": [
374 | 0,
375 | 1,
376 | 2,
377 | 3,
378 | 4,
379 | 5,
380 | 6,
381 | 7,
382 | 8,
383 | 9
384 | ],
385 | "friends": [
386 | {
387 | "id": 0,
388 | "name": "Maude Pugh"
389 | },
390 | {
391 | "id": 1,
392 | "name": "Eliza Juarez"
393 | },
394 | {
395 | "id": 2,
396 | "name": "Lilly Whitfield"
397 | }
398 | ],
399 | "greeting": "Hello, Le! You have 8 unread messages.",
400 | "favoriteFruit": "banana"
401 | },
402 | {
403 | "id": "5f6dc0856ed52427a5f3ee53",
404 | "index": 7,
405 | "guid": "13b60dff-2703-4b72-ba75-27db452ad58f",
406 | "isActive": false,
407 | "balance": "$1,432.23",
408 | "picture": "http://placehold.it/32x32",
409 | "age": 34,
410 | "eyeColor": 0,
411 | "name": {
412 | "first": "Huber",
413 | "last": "Pate"
414 | },
415 | "company": "SULTRAX",
416 | "email": "huber.pate@sultrax.name",
417 | "phone": "+1 (864) 450-2780",
418 | "address": "437 Huntington Street, Venice, Federated States Of Micronesia, 5864",
419 | "about": "Eu commodo nostrud ea nulla amet. Enim ullamco elit dolor ipsum dolor cupidatat aliquip officia sint nulla. Do elit quis sit aliquip aliquip duis quis cillum occaecat eu sint duis proident pariatur. Veniam proident nisi incididunt laborum enim eiusmod do proident occaecat laboris nisi. Sit elit ea incididunt exercitation deserunt culpa.",
420 | "registered": "Sunday, August 16, 2020 12:54 PM",
421 | "latitude": "63.340708",
422 | "longitude": "-120.765404",
423 | "tags": [
424 | "ad",
425 | "aliqua",
426 | "proident",
427 | "incididunt",
428 | "qui"
429 | ],
430 | "range": [
431 | 0,
432 | 1,
433 | 2,
434 | 3,
435 | 4,
436 | 5,
437 | 6,
438 | 7,
439 | 8,
440 | 9
441 | ],
442 | "friends": [
443 | {
444 | "id": 0,
445 | "name": "Mclean Melton"
446 | },
447 | {
448 | "id": 1,
449 | "name": "Moore Downs"
450 | },
451 | {
452 | "id": 2,
453 | "name": "Tamika Gomez"
454 | }
455 | ],
456 | "greeting": "Hello, Huber! You have 7 unread messages.",
457 | "favoriteFruit": "strawberry"
458 | },
459 | {
460 | "id": "5f6dc086c1b744054ae315d2",
461 | "index": 8,
462 | "guid": "f8fd68a3-a4ef-4182-a259-f9997b92d4e6",
463 | "isActive": false,
464 | "balance": "$3,770.18",
465 | "picture": "http://placehold.it/32x32",
466 | "age": 36,
467 | "eyeColor": 0,
468 | "name": {
469 | "first": "Zimmerman",
470 | "last": "Griffith"
471 | },
472 | "company": "COGNICODE",
473 | "email": "zimmerman.griffith@cognicode.me",
474 | "phone": "+1 (810) 519-3677",
475 | "address": "453 Gerald Court, Shasta, Nebraska, 7221",
476 | "about": "Incididunt reprehenderit aliquip id exercitation ipsum minim. Labore et quis officia est est pariatur aute tempor voluptate proident cupidatat commodo elit adipisicing. Enim nulla aliqua dolore esse Lorem officia. Mollit anim eu est aute commodo mollit esse excepteur quis.",
477 | "registered": "Sunday, February 7, 2016 5:14 PM",
478 | "latitude": "41.885768",
479 | "longitude": "-34.921204",
480 | "tags": [
481 | "ipsum",
482 | "laborum",
483 | "ullamco",
484 | "mollit",
485 | "excepteur"
486 | ],
487 | "range": [
488 | 0,
489 | 1,
490 | 2,
491 | 3,
492 | 4,
493 | 5,
494 | 6,
495 | 7,
496 | 8,
497 | 9
498 | ],
499 | "friends": [
500 | {
501 | "id": 0,
502 | "name": "Caldwell Harding"
503 | },
504 | {
505 | "id": 1,
506 | "name": "Tiffany Hanson"
507 | },
508 | {
509 | "id": 2,
510 | "name": "Dale Carlson"
511 | }
512 | ],
513 | "greeting": "Hello, Zimmerman! You have 5 unread messages.",
514 | "favoriteFruit": "apple"
515 | },
516 | {
517 | "id": "5f6dc0867962a54030e77983",
518 | "index": 9,
519 | "guid": "943bc6f0-632f-400d-9262-dbd25ab3911c",
520 | "isActive": false,
521 | "balance": "$3,543.03",
522 | "picture": "http://placehold.it/32x32",
523 | "age": 38,
524 | "eyeColor": 1,
525 | "name": {
526 | "first": "Schmidt",
527 | "last": "Baldwin"
528 | },
529 | "company": "PRIMORDIA",
530 | "email": "schmidt.baldwin@primordia.biz",
531 | "phone": "+1 (879) 542-2641",
532 | "address": "871 Homecrest Court, Dante, Missouri, 5176",
533 | "about": "Laboris eiusmod nisi nisi ut minim aute laboris nulla commodo officia laboris occaecat. Nostrud amet veniam elit voluptate. Enim elit in officia reprehenderit nulla laboris culpa ullamco sit ut. Lorem commodo quis officia do commodo laborum dolore fugiat laborum amet ipsum elit. Esse ut culpa aliquip anim. Non velit reprehenderit nostrud ipsum dolor aliquip pariatur eu consequat deserunt minim occaecat qui. Esse sunt laborum sunt nulla non esse duis et officia.",
534 | "registered": "Friday, May 11, 2018 11:47 PM",
535 | "latitude": "-18.614778",
536 | "longitude": "-14.285861",
537 | "tags": [
538 | "aute",
539 | "id",
540 | "est",
541 | "ut",
542 | "Lorem"
543 | ],
544 | "range": [
545 | 0,
546 | 1,
547 | 2,
548 | 3,
549 | 4,
550 | 5,
551 | 6,
552 | 7,
553 | 8,
554 | 9
555 | ],
556 | "friends": [
557 | {
558 | "id": 0,
559 | "name": "Alisha Daniels"
560 | },
561 | {
562 | "id": 1,
563 | "name": "Carlene Rios"
564 | },
565 | {
566 | "id": 2,
567 | "name": "Sheppard Garrett"
568 | }
569 | ],
570 | "greeting": "Hello, Schmidt! You have 9 unread messages.",
571 | "favoriteFruit": "banana"
572 | }
573 | ]
574 | }
--------------------------------------------------------------------------------
/test_jsons/small.json:
--------------------------------------------------------------------------------
1 | {
2 | "users": [
3 | {
4 | "id": "5f6dbf4fa43422511485b6dc",
5 | "index": 0,
6 | "guid": "4ae3f0a5-b0e2-450e-99cd-f00b4fa4a27d",
7 | "isActive": false,
8 | "balance": "$3,387.95",
9 | "picture": "http://placehold.it/32x32",
10 | "age": 34,
11 | "eyeColor": 1,
12 | "name": {
13 | "first": "Rosales",
14 | "last": "Vazquez"
15 | },
16 | "company": "REALYSIS",
17 | "email": "rosales.vazquez@realysis.net",
18 | "phone": "+1 (997) 453-3254",
19 | "address": "917 Bevy Court, Jugtown, Utah, 5912",
20 | "about": "Cupidatat aute in amet deserunt do nostrud tempor in. Velit eu proident ut ea consequat sit cillum nisi in voluptate non veniam ullamco. Ad nulla adipisicing dolor excepteur ullamco exercitation laboris do dolore laborum tempor.",
21 | "registered": "Saturday, January 31, 2015 4:56 PM",
22 | "latitude": "-83.173631",
23 | "longitude": "22.992638",
24 | "tags": [
25 | "sunt",
26 | "ad",
27 | "ut",
28 | "amet",
29 | "dolore"
30 | ],
31 | "range": [
32 | 0,
33 | 1,
34 | 2,
35 | 3,
36 | 4,
37 | 5,
38 | 6,
39 | 7,
40 | 8,
41 | 9
42 | ],
43 | "friends": [
44 | {
45 | "id": 0,
46 | "name": "Norris Stevenson"
47 | },
48 | {
49 | "id": 1,
50 | "name": "Yvette Barrera"
51 | },
52 | {
53 | "id": 2,
54 | "name": "Alice Dorsey"
55 | }
56 | ],
57 | "greeting": "Hello, Rosales! You have 10 unread messages.",
58 | "favoriteFruit": "strawberry"
59 | }
60 | ]
61 | }
--------------------------------------------------------------------------------
/test_jsons/tiny.json:
--------------------------------------------------------------------------------
1 | {
2 | "users": []
3 | }
--------------------------------------------------------------------------------
/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 |
--------------------------------------------------------------------------------