Commit Graph

4 Commits

Author SHA1 Message Date
Aren Patel f3b4acfd23
RFC 3339 support for both Marshal and Unmarshal. (#204)
* RFC 3339 support for both Marshal and Unmarshal.

* Post merge cleanup

* Update request_test.go

Co-authored-by: Quetzy Garcia <quetzy.garcia@integrate.com>

* Spelling

* Update request.go

Co-authored-by: Quetzy Garcia <quetzy.garcia@integrate.com>

* Simplify the ISO 8601 logic. No need for the const rfc3339TimeFormat use time.RFC3339 directly.

Co-authored-by: Quetzy Garcia <quetzy.garcia@integrate.com>
2021-04-05 11:13:02 -07:00
Aren Patel 58702143d4
Revert "Add RFC3339 timestamp (#201)" (#203)
This reverts commit c0ee6d2554.
2021-04-03 09:11:22 -07:00
Omar Ismail c0ee6d2554
Add RFC3339 timestamp (#201)
@omarismail LGTM.

I'm curious what you think about perhaps documenting these `iso8601` and `rfc3339` in the `Readme.md`? How did you find that this tag option/value existed? How can we make this better for others vs having to search the library implementation?
2021-04-02 17:10:43 -07:00
Aren Patel 2cb19b89ed Skimata's null relationships + fixes (#62)
* Add support to nullify relationship; http://jsonapi.org/format/#document-resource-object-linkage

* Fixed: [null] is not valid as an empty relationship.

* add support for 'omitempty' on relationships; default behavior of marshalling empty/nil relations (i.e. w/o 'omitempty' tag) marshals with null data relation

* cleanup whitespace

* Added go 1.7 to test versions; fixed the marshaling of empty relations to return an empty array rather than a null/nil. Added a more robust test case for the marshaling of non omitted relations.

* Cleanup.

* Added a comment to UnmarshalMany

* Document the ‘omitempty’ annotation on a relation.

* Add common JSON API values as exported jsonapi pkg constants.
2017-01-20 16:13:04 -08:00