json2go
json2go copied to clipboard
feat: add string tag & json.Number
feat: add string tag & json.Number
Hello, here are two functional changes. Thanks for reviewing it.
- Add a new cmd option
-S -stringtag. Allow users to let our tool to try to add a,stringtag into string type fields that look like numbers. - Use
json.Numberinterface to determine whether the field is a float or an integer.
And I wrote a test function for example. Do you think there is anything else I should add? I would be gladly to add them. :)