panko_serializer 0.7.2 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/.travis.yml +3 -3
- data/README.md +4 -4
- data/benchmarks/bm_panko_json.rb +5 -1
- data/benchmarks/setup.rb +3 -1
- data/benchmarks/type_casts/bm_panko.rb +2 -2
- data/docs/.DS_Store +0 -0
- data/docs/README.md +195 -8
- data/docs/core/Footer.js +81 -0
- data/docs/{associations.md → docs/associations.md} +5 -1
- data/docs/{attributes.md → docs/attributes.md} +6 -2
- data/docs/{design-choices.md → docs/design-choices.md} +5 -1
- data/docs/{getting-started.md → docs/getting-started.md} +5 -1
- data/docs/docs/introduction.md +13 -0
- data/docs/{docpress.json → docs/panko/docpress.json} +0 -0
- data/docs/{performance.md → docs/performance.md} +11 -7
- data/docs/{response-bag.md → docs/response-bag.md} +5 -1
- data/docs/i18n/en.json +50 -0
- data/docs/package-lock.json +9636 -0
- data/docs/package.json +14 -0
- data/docs/sidebars.json +15 -0
- data/docs/siteConfig.js +79 -0
- data/docs/static/.DS_Store +0 -0
- data/docs/static/css/custom.css +51 -0
- data/docs/static/img/favicon.ico +0 -0
- data/docs/static/img/oss_logo.png +0 -0
- data/docs/static/img/undraw_code_review.svg +1 -0
- data/docs/static/img/undraw_monitor.svg +1 -0
- data/docs/static/img/undraw_note_list.svg +1 -0
- data/docs/static/img/undraw_online.svg +1 -0
- data/docs/static/img/undraw_open_source.svg +1 -0
- data/docs/static/img/undraw_operating_system.svg +1 -0
- data/docs/static/img/undraw_react.svg +1 -0
- data/docs/static/img/undraw_tweetstorm.svg +1 -0
- data/docs/static/img/undraw_youtube_tutorial.svg +1 -0
- data/docs/static/index.html +14 -0
- data/ext/panko_serializer/attributes_writer/active_record.c +6 -5
- data/ext/panko_serializer/attributes_writer/common.h +1 -1
- data/ext/panko_serializer/attributes_writer/hash.c +2 -4
- data/ext/panko_serializer/attributes_writer/plain.c +2 -3
- data/ext/panko_serializer/attributes_writer/type_cast/type_cast.c +54 -21
- data/ext/panko_serializer/attributes_writer/type_cast/type_cast.h +1 -2
- data/ext/panko_serializer/panko_serializer.c +15 -7
- data/lib/panko/object_writer.rb +8 -0
- data/lib/panko/version.rb +1 -1
- metadata +31 -9
data/lib/panko/object_writer.rb
CHANGED
@@ -33,6 +33,14 @@ class Panko::ObjectWriter
|
|
33
33
|
@values.last[key] = value.as_json
|
34
34
|
end
|
35
35
|
|
36
|
+
def push_json(value, key = nil)
|
37
|
+
if value.is_a?(String)
|
38
|
+
value = Oj.load(value) rescue nil
|
39
|
+
end
|
40
|
+
|
41
|
+
push_value(value, key)
|
42
|
+
end
|
43
|
+
|
36
44
|
def pop
|
37
45
|
result = @values.pop
|
38
46
|
|
data/lib/panko/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: panko_serializer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yosi Attias
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|
@@ -59,14 +59,36 @@ files:
|
|
59
59
|
- benchmarks/type_casts/bm_active_record.rb
|
60
60
|
- benchmarks/type_casts/bm_panko.rb
|
61
61
|
- benchmarks/type_casts/support.rb
|
62
|
+
- docs/.DS_Store
|
62
63
|
- docs/README.md
|
63
|
-
- docs/
|
64
|
-
- docs/
|
65
|
-
- docs/
|
66
|
-
- docs/
|
67
|
-
- docs/getting-started.md
|
68
|
-
- docs/
|
69
|
-
- docs/
|
64
|
+
- docs/core/Footer.js
|
65
|
+
- docs/docs/associations.md
|
66
|
+
- docs/docs/attributes.md
|
67
|
+
- docs/docs/design-choices.md
|
68
|
+
- docs/docs/getting-started.md
|
69
|
+
- docs/docs/introduction.md
|
70
|
+
- docs/docs/panko/docpress.json
|
71
|
+
- docs/docs/performance.md
|
72
|
+
- docs/docs/response-bag.md
|
73
|
+
- docs/i18n/en.json
|
74
|
+
- docs/package-lock.json
|
75
|
+
- docs/package.json
|
76
|
+
- docs/sidebars.json
|
77
|
+
- docs/siteConfig.js
|
78
|
+
- docs/static/.DS_Store
|
79
|
+
- docs/static/css/custom.css
|
80
|
+
- docs/static/img/favicon.ico
|
81
|
+
- docs/static/img/oss_logo.png
|
82
|
+
- docs/static/img/undraw_code_review.svg
|
83
|
+
- docs/static/img/undraw_monitor.svg
|
84
|
+
- docs/static/img/undraw_note_list.svg
|
85
|
+
- docs/static/img/undraw_online.svg
|
86
|
+
- docs/static/img/undraw_open_source.svg
|
87
|
+
- docs/static/img/undraw_operating_system.svg
|
88
|
+
- docs/static/img/undraw_react.svg
|
89
|
+
- docs/static/img/undraw_tweetstorm.svg
|
90
|
+
- docs/static/img/undraw_youtube_tutorial.svg
|
91
|
+
- docs/static/index.html
|
70
92
|
- ext/panko_serializer/attributes_writer/active_record.c
|
71
93
|
- ext/panko_serializer/attributes_writer/active_record.h
|
72
94
|
- ext/panko_serializer/attributes_writer/attributes_writer.c
|