Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/segment-boneyard/go-json-datatypes

Get JSON datatype for given value.
https://github.com/segment-boneyard/go-json-datatypes

Last synced: about 5 hours ago
JSON representation

Get JSON datatype for given value.

Awesome Lists containing this project

README

        

# go-json-datatypes
--
import "github.com/segmentio/go-json-datatypes"

Get JSON datatype for given value.

## Example

```go

package main

import "github.com/segmentio/go-json-datatypes"
import "fmt"

func main() {
fmt.Println(Datatype("hello world"))
// String
fmt.Println(Datatype(15))
// Number
fmt.Println(Datatype([]string{"hello"}))
// Array
// ..
}
```

## License

MIT