store header in extensible json format. close #4

not compact though, but it will not contain much info