Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
encoding/json: Documentation for prefix on Indent is unclear #7821
What does 'go version' print? go version devel +2114e9e65d6c Sat Apr 19 14:47:20 2014 +1000 linux/amd64 What steps reproduce the problem? http://play.golang.org/p/aBDpARpATq What happened? I expected each line to have the prefix I specified (in this case ">>>"), but the first line is missing it. What should have happened instead? The documentation speaks of elements in a json object or array each being prefixed by the prefix and the appropriate count of indents. I am uncertain what exactly counts as an 'element'. My issue is that there's probably a good reason for the current behavior and that reason should be added to the documentation. If there is not a good reason for it, the behavior should change. Provided with the former I am happy to add the verbiage explaining why, and lacking that I am happy to submit a patch to add prefix to the first line.