* working version
* fix text
* combine test files
* move private funcs to bottom
* ErrInvalidType should ignore interfaces
* replace MarshalOnePayload w/ MarshalPayload; fix bug w/ node merge()
* minor tweaks; address a couple comments
* decompose unmarshalNode() to smaller funcs; unmarshal should go from top-level to embedded
* deep copy the node when passing relation/sideloaded notes to unmarshal()
* add some comments and do some additional cleanup
* add test uses annotationIgnore
* implement support for struct fields that implement json.Marshaler/Unmarshaler
* add additional test that compares marshal/unmarshal behavior w/ standard json library
* add support for pointer embedded structs
* Revert "implement support for struct fields that implement json.Marshaler/Unmarshaler"
This reverts commit deeffb78df.
* Used to have 6 functions: MarshalOnePayload, MarshalOnePayloadWithoutIncluded, MarshalOne, MarshalManyPayload, MarshalManyPayloadWithoutIncluded, MarshalMany - now there are only 3: MarshalPayload, MarshalPayloadWithoutIncluded, Marshal. This simplifies the public API; will be easier to explain and document while still providing the existing support for struct ptrs (&Blog{}) and slices of struct ptrs ([]*Blog{}).
* Correcting all code occurrences leftover.
* Updating README to reflect Marshal API changes.
* Omit the mention of One vs Many
This commit adds omitempty to the field ID of type Node. This is needed
when constructing an entity client-side and sending it to the server for
creation. Without omitempty, the constructed entity will contain an
empty "id": "", which is not sensible to transmit.
This change addresses #83.
* add Meta field in node structs and Metable/RelationshipMetable interfaces
* update response marshalling to add Meta
* update tests for presence of Meta
* add Metable and RelationshipMetable interfaces to example
* update README to include Meta details
* Implement `links` via optional interfaces
* Updating example app to include links
* Update readme with links information
* Exclude a slice relationship only if the slice is empty AND there are no defined links
* Remove `Link` in favor of vanilla `map[string]interface{}`. More flexible for different allowed links spec implementations.
* Update app.go with correct Links methods
* Use LinksObject and LinkObject types along with type assertion to provide errors when marshaling an invalid links JSON API object.
* Renamed LinksObject Links and LinkObject Link
* Added back the relationship link post merge.
* Renamed the JSON* Linkable functions JSONAPI* such that when a library user implements the interface it is clear the functions are used for JSON API as opposed to JSON
* Example cleanup.
* Refactor the example to use constants from jsonapi and http.
* 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.
* add support for direct use of slice of struct pointers for MarshalMany
* Added a test to ensure that whether MarshalManyPayload is called with a []interface{} or []*Struct it will produce the same desired result.
* Added a test to show how the new error type may be returned.
* Ensure the outside accessible Errs have comments.
* Page char width cleanup. Addressed warnings about duplicated "client-id" definition; using the const.