From e22856db883897c7a5b1cb4fb606e50682498970 Mon Sep 17 00:00:00 2001 From: Sam Woodard Date: Thu, 11 Oct 2018 09:08:03 -0700 Subject: [PATCH] add documentation for primative custom types only --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 44b0541..2c636f3 100644 --- a/README.md +++ b/README.md @@ -343,6 +343,23 @@ func (post Post) JSONAPIRelationshipMeta(relation string) *Meta { } ``` +### Custom types + +Custom types are supported for primitive types, only, as attributes. Examples, + +```go +type CustomIntType int +type CustomFloatType float64 +type CustomStringType string +``` + +Types like following are not supported, but may be in the future: + +```go +type CustomMapType map[string]interface{} +type CustomSliceMapType []map[string]interface{} +``` + ### Errors This package also implements support for JSON API compatible `errors` payloads using the following types.