@@ -11,7 +11,7 @@ import (
1111)
1212
1313type Magic struct {
14- ID MagicID `jsonapi:"-" json:"-"`
14+ ID MagicID `json:"-"`
1515}
1616
1717func (m Magic ) GetID () string {
@@ -25,7 +25,7 @@ func (m MagicID) String() string {
2525}
2626
2727type Comment struct {
28- ID int `jsonapi:"-" json:"-"`
28+ ID int `json:"-"`
2929 Text string `json:"text"`
3030}
3131
@@ -45,9 +45,9 @@ func (c *Comment) SetID(stringID string) error {
4545}
4646
4747type User struct {
48- ID int `jsonapi:"-" json:"-"`
48+ ID int `json:"-"`
4949 Name string `json:"name"`
50- Password string `jsonapi:"-" json:"-"`
50+ Password string `json:"-"`
5151}
5252
5353func (u User ) GetID () string {
@@ -66,14 +66,14 @@ func (u *User) SetID(stringID string) error {
6666}
6767
6868type SimplePost struct {
69- ID string `jsonapi:"-" json:"-"`
69+ ID string `json:"-"`
7070 Title string `json:"title"`
7171 Text string `json:"text"`
72- Internal string `jsonapi:"-" json:"-"`
72+ Internal string `json:"-"`
7373 Size int `json:"size"`
74- Created time.Time `jsonapi:"name=created-date" json:"created-date"`
75- Updated time.Time `jsonapi:"name=updated-date" json:"updated-date"`
76- topSecret string `jsonapi:"name=top-secret" json:"top-secret"`
74+ Created time.Time `json:"created-date"`
75+ Updated time.Time `json:"updated-date"`
76+ topSecret string `json:"top-secret"`
7777}
7878
7979func (s SimplePost ) GetID () string {
@@ -87,14 +87,14 @@ func (s *SimplePost) SetID(ID string) error {
8787}
8888
8989type Post struct {
90- ID int `jsonapi:"-" json:"-"`
90+ ID int `json:"-"`
9191 Title string `json:"title"`
92- Comments []Comment `jsonapi:"-" json:"-"`
93- CommentsIDs []int `jsonapi:"-" json:"-"`
94- CommentsEmpty bool `jsonapi:"-" json:"-"`
95- Author * User `jsonapi:"-" json:"-"`
96- AuthorID sql.NullInt64 `jsonapi:"-" json:"-"`
97- AuthorEmpty bool `jsonapi:"-" json:"-"`
92+ Comments []Comment `json:"-"`
93+ CommentsIDs []int `json:"-"`
94+ CommentsEmpty bool `json:"-"`
95+ Author * User `json:"-"`
96+ AuthorID sql.NullInt64 `json:"-"`
97+ AuthorEmpty bool `json:"-"`
9898}
9999
100100func (c Post ) GetID () string {
@@ -217,9 +217,9 @@ func (c *Post) SetReferencedStructs(references []UnmarshalIdentifier) error {
217217}
218218
219219type AnotherPost struct {
220- ID int `jsonapi:"-" json:"-"`
221- AuthorID int `jsonapi:"-" json:"-"`
222- Author * User `jsonapi:"-" json:"-"`
220+ ID int `json:"-"`
221+ AuthorID int `json:"-"`
222+ Author * User `json:"-"`
223223}
224224
225225func (p AnotherPost ) GetID () string {
@@ -246,7 +246,7 @@ func (p AnotherPost) GetReferencedIDs() []ReferenceID {
246246}
247247
248248type ZeroPost struct {
249- ID string `jsonapi:"-" json:"-"`
249+ ID string `json:"-"`
250250 Title string `json:"title"`
251251 Value zero.Float `json:"value"`
252252}
@@ -256,7 +256,7 @@ func (z ZeroPost) GetID() string {
256256}
257257
258258type ZeroPostPointer struct {
259- ID string `jsonapi:"-" json:"-"`
259+ ID string `json:"-"`
260260 Title string `json:"title"`
261261 Value * zero.Float `json:"value"`
262262}
@@ -266,10 +266,10 @@ func (z ZeroPostPointer) GetID() string {
266266}
267267
268268type Question struct {
269- ID string `jsonapi:"-" json:"-"`
269+ ID string `json:"-"`
270270 Text string `json:"text"`
271- InspiringQuestionID sql.NullString `jsonapi:"-" json:"-"`
272- InspiringQuestion * Question `jsonapi:"-" json:"-"`
271+ InspiringQuestionID sql.NullString `json:"-"`
272+ InspiringQuestion * Question `json:"-"`
273273}
274274
275275func (q Question ) GetID () string {
@@ -304,7 +304,7 @@ func (q Question) GetReferencedStructs() []MarshalIdentifier {
304304}
305305
306306type Identity struct {
307- ID int64 `jsonapi :"-"`
307+ ID int64 `json :"-"`
308308 Scopes []string `json:"scopes"`
309309}
310310
@@ -328,7 +328,7 @@ func (u Unicorn) GetID() string {
328328}
329329
330330type NumberPost struct {
331- ID string `jsonapi :"-"`
331+ ID string `json :"-"`
332332 Title string
333333 Number int64
334334 UnsignedNumber uint64
@@ -341,7 +341,7 @@ func (n *NumberPost) SetID(ID string) error {
341341}
342342
343343type SQLNullPost struct {
344- ID string `jsonapi:"-" json:"-"`
344+ ID string `json:"-"`
345345 Title zero.String `json:"title"`
346346 Likes zero.Int `json:"likes"`
347347 Rating zero.Float `json:"rating"`
@@ -360,11 +360,11 @@ func (s *SQLNullPost) SetID(ID string) error {
360360
361361type RenamedPostWithEmbedding struct {
362362 Embedded SQLNullPost
363- ID string `jsonapi:"-" json:"-"`
364- Another string `jsonapi:"name=another" json:"another"`
365- Field string `jsonapi:"name=foo" json:"foo"`
366- Other string `jsonapi:"name=bar-bar" json:"bar-bar"`
367- Ignored string `jsonapi:"-" json:"-"`
363+ ID string `json:"-"`
364+ Another string `json:"another"`
365+ Field string `json:"foo"`
366+ Other string `json:"bar-bar"`
367+ Ignored string `json:"-"`
368368}
369369
370370func (p * RenamedPostWithEmbedding ) SetID (ID string ) error {
0 commit comments