Skip to content

Commit e22856d

Browse files
committed
add documentation for primative custom types only
1 parent 1947fea commit e22856d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,23 @@ func (post Post) JSONAPIRelationshipMeta(relation string) *Meta {
343343
}
344344
```
345345

346+
### Custom types
347+
348+
Custom types are supported for primitive types, only, as attributes. Examples,
349+
350+
```go
351+
type CustomIntType int
352+
type CustomFloatType float64
353+
type CustomStringType string
354+
```
355+
356+
Types like following are not supported, but may be in the future:
357+
358+
```go
359+
type CustomMapType map[string]interface{}
360+
type CustomSliceMapType []map[string]interface{}
361+
```
362+
346363
### Errors
347364
This package also implements support for JSON API compatible `errors` payloads using the following types.
348365

0 commit comments

Comments
 (0)