{"repo":"stretchr/objx","free":true,"listed":false,"github":"https://github.com/stretchr/objx","clone":"git clone https://github.com/stretchr/objx.git","description":"Go package for dealing with maps, slices, JSON and other data.","language":"Go","stars":865,"topics":["go","golang","objx"],"license":"MIT","category":"dev-tools","readme_excerpt":"Objx Objx - Go package for dealing with maps, slices, JSON and other data. Get started: - Install Objx with one line of code, or update it with another - Check out the API Documentation http://pkg.go.dev/github.com/stretchr/objx Overview Objx provides the objx.Map type, which is a map[string]interface{} that exposes a powerful Get method (among others) that allows you to easily and quickly get access to data within the map, without having to worry too much about type assertions, missing data, default values etc. Pattern Objx uses a predictable pattern to make access data from within map[string]interface{} easy. Call one of the objx. functions to create your objx.Map to get going: NOTE: Any methods or functions with the Must prefix will panic if something goes wrong, the rest will be optimistic and try to figure things out without panicking. Use Get to access the value you're interested in. You can use dot and array notation too: Once you have sought the Value you're interested in, you can use the Is methods to determine its type. Or you can just assume the type, and use one of the strong type methods to extract the real value: If there's no value there (or if it's the wrong type) then a default value will be returned, or you can be explicit about the default value. If you're dealing with a slice of data as a value, Objx provides many useful methods for iterating, manipulating and selecting that data. You can find out more by exploring the index below. Reading data A simple ex","default_branch":null,"files":null,"tree":[],"storefront":"/r/stretchr","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/stretchr/objx/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}