borer icon indicating copy to clipboard operation
borer copied to clipboard

Json primitive map keys

Open OndrejSpanel opened this issue 5 years ago • 2 comments

The code submitted supports Short, Int and Long in both reader and renderer.

Can you please check if the overall style is acceptable for you? I am unsure about a few things:

  • I made the JSON reader to accept Chars anywhere an integral type (int, long, short) is expected. I am not sure if this is desired behaviour. If the strings as numbers should be accepted in map keys only, please advise how can I recognize I am parsing a key
  • there is very little error handling. Once the decoder decodes a Long sucessfully, it will be silently truncated to Int or Short if such type is expected. If you want more error handling, I can add it

OndrejSpanel avatar Nov 11 '20 13:11 OndrejSpanel

Codecov Report

Merging #319 (9e46b0a) into master (4f4ac9c) will decrease coverage by 0.03%. The diff coverage is 60.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #319      +/-   ##
==========================================
- Coverage   74.02%   73.99%   -0.04%     
==========================================
  Files          63       64       +1     
  Lines        4893     4902       +9     
  Branches      575      588      +13     
==========================================
+ Hits         3622     3627       +5     
- Misses       1271     1275       +4     
Impacted Files Coverage Δ
core/src/main/scala/io/bullet/borer/Reader.scala 70.34% <50.00%> (-0.21%) :arrow_down:
...main/scala/io/bullet/borer/json/JsonRenderer.scala 75.43% <100.00%> (-0.59%) :arrow_down:
.../io/bullet/borer/derivation/DerivationConfig.scala 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update adff294...9e46b0a. Read the comment docs.

codecov-io avatar Nov 11 '20 15:11 codecov-io

@sirthias Can you please take a look and tell me what you think about it?

OndrejSpanel avatar Nov 13 '20 19:11 OndrejSpanel