intenthq / anon

A UNIX Command To Anonymise Data
MIT License
354 stars 14 forks source link

Add basic JSON support #25

Open albertpastrana opened 5 years ago

albertpastrana commented 5 years ago

By applying this commit the anon tool will be able to read, anonymise and output basic JSON files.

It currently only supports one level JSON fields.

Some small refactor has been done and it's more than probable that the solution could be a bit DRYer, but don't have time to do so.

Signed-off-by: Albert Pastrana albert.pastrana@intenthq.com

codecov[bot] commented 5 years ago

Codecov Report

Merging #25 into master will decrease coverage by 6.62%. The diff coverage is 65.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #25      +/-   ##
==========================================
- Coverage      85%   78.37%   -6.63%     
==========================================
  Files           3        5       +2     
  Lines         140      185      +45     
==========================================
+ Hits          119      145      +26     
- Misses         18       37      +19     
  Partials        3        3
Impacted Files Coverage Δ
config.go 100% <ø> (ø) :arrow_up:
main.go 43.24% <0%> (-24.45%) :arrow_down:
anonymisations.go 100% <100%> (ø) :arrow_up:
csv_processor.go 70% <70%> (ø)
json_processor.go 72% <72%> (ø)

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 fecd661...744ecb9. Read the comment docs.