Skip to content

72sevenzy2/json-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A mini json response lib for http servers in golang.

  • the parser itself includes helper functions (such as Ok() and Failed()) so you dont manually write all the boilerplate for the functional options that go into the JSON() func. The Ok() func takes in an ResponseWriter and a []byte to encode the response, in which the []byte can be passed in with the []byte value returned by the json.Marshal() function. The Failed() func just takes in a ResponseWriter and an status number, and an error message that is to be displayed, in which the message in encoded internally into json before being sent.

About

response utility made for Xrouter, also for me to use in future go projects.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages