Dynamic JSON Parsing

Almost always when writing a REST endpoint you will know beforehand the format of the data you will receive and you can write your downstream client accordingly. Barring documentation you can parse a curl response and adjust accordingly, but what if the tables were turned and you needed to dynamically parse unknown JSON? In Python, with a dynamic type system, this is relatively straight forward. Let’s parse and print the results such as in this example. [Read More]
Go  REST 

Go Rest Endpoint

An example of a simple REST endpoint in go is: https://github.com/kcotten/restep Choosing gorilla/mux yields a cleaner, simpler interface that works well with the standard library. From main() instantiate the router, for handling the HTTP routes, initialize it, and finally listen and serve. The router instantiated is the mux.Router that we will use to register routes to be served. Since this is just an example nothing more sophisticated than serving a GET endpoint at /info is happening. [Read More]