Skip to content

Support tabs on MarshalIndent #273

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

shdunning
Copy link

@shdunning shdunning commented May 17, 2018

Fixes #253

Support for using tabs on calls to MarshalIndent like so:

json.MarshalIndent(v, "", "\t")

Todo:

  • error check that mixed tabs and spaces are not supported
  • tests
@codecov
Copy link

codecov bot commented May 17, 2018

Codecov Report

Merging #273 into master will decrease coverage by 0.16%.
The diff coverage is 53.84%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #273      +/-   ##
==========================================
- Coverage   81.35%   81.19%   -0.17%     
==========================================
  Files          41       41              
  Lines        4978     4988      +10     
==========================================
  Hits         4050     4050              
- Misses        811      819       +8     
- Partials      117      119       +2
Impacted Files Coverage Δ
stream.go 84.46% <50%> (-1.54%) ⬇️
config.go 88.02% <55.55%> (-0.63%) ⬇️
reflect_struct_decoder.go 44.63% <0%> (-0.84%) ⬇️

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 2ddf6d7...d9d855a. Read the comment docs.

@shdunning shdunning changed the title Support tabs on MarshalIndent (WIP) May 17, 2018
@shdunning
Copy link
Author

@taowen can you take a look at this one plz?

@akyoto
Copy link

akyoto commented Oct 11, 2018

I stumbled upon this problem as well, the use of tabs caused a panic on my webserver after switching to this library.
Would love it if tabs were supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants