|
35 | 35 | _ gojay.UnmarshalerJSONObject = (*CallHierarchy)(nil)
|
36 | 36 | )
|
37 | 37 |
|
38 |
| -// MarshalJSONObject implements gojay.MarshalerJSONObject. |
39 |
| -func (v *CallHierarchyOptions) MarshalJSONObject(enc *gojay.Encoder) { |
40 |
| - enc.BoolKeyOmitEmpty(keyWorkDoneProgress, v.WorkDoneProgress) |
41 |
| -} |
42 |
| - |
43 |
| -// IsNil returns wether the structure is nil value or not. |
44 |
| -func (v *CallHierarchyOptions) IsNil() bool { return v == nil } |
45 |
| - |
46 |
| -// UnmarshalJSONObject implements gojay's UnmarshalerJSONObject. |
47 |
| -func (v *CallHierarchyOptions) UnmarshalJSONObject(dec *gojay.Decoder, k string) error { |
48 |
| - if k == keyWorkDoneProgress { |
49 |
| - return dec.Bool(&v.WorkDoneProgress) |
50 |
| - } |
51 |
| - return nil |
52 |
| -} |
53 |
| - |
54 |
| -// NKeys returns the number of keys to unmarshal. |
55 |
| -func (v *CallHierarchyOptions) NKeys() int { return 1 } |
56 |
| - |
57 |
| -// compile time check whether the CallHierarchyOptions implements a gojay.MarshalerJSONObject and gojay.UnmarshalerJSONObject interfaces. |
58 |
| -var ( |
59 |
| - _ gojay.MarshalerJSONObject = (*CallHierarchyOptions)(nil) |
60 |
| - _ gojay.UnmarshalerJSONObject = (*CallHierarchyOptions)(nil) |
61 |
| -) |
62 |
| - |
63 |
| -// MarshalJSONObject implements gojay.MarshalerJSONObject. |
64 |
| -func (v *CallHierarchyRegistrationOptions) MarshalJSONObject(enc *gojay.Encoder) { |
65 |
| - enc.AddArrayKey(keyDocumentSelector, &v.DocumentSelector) |
66 |
| - enc.BoolKeyOmitEmpty(keyWorkDoneProgress, v.WorkDoneProgress) |
67 |
| - enc.StringKeyOmitEmpty(keyID, v.ID) |
68 |
| -} |
69 |
| - |
70 |
| -// IsNil implements gojay.MarshalerJSONObject. |
71 |
| -func (v *CallHierarchyRegistrationOptions) IsNil() bool { return v == nil } |
72 |
| - |
73 |
| -// UnmarshalJSONObject implements gojay.UnmarshalerJSONObject. |
74 |
| -func (v *CallHierarchyRegistrationOptions) UnmarshalJSONObject(dec *gojay.Decoder, k string) error { |
75 |
| - switch k { |
76 |
| - case keyDocumentSelector: |
77 |
| - if v.DocumentSelector == nil { |
78 |
| - v.DocumentSelector = DocumentSelector{} |
79 |
| - } |
80 |
| - return dec.Array(&v.DocumentSelector) |
81 |
| - case keyWorkDoneProgress: |
82 |
| - return dec.Bool(&v.WorkDoneProgress) |
83 |
| - case keyID: |
84 |
| - return dec.String(&v.ID) |
85 |
| - } |
86 |
| - return nil |
87 |
| -} |
88 |
| - |
89 |
| -// NKeys implements gojay.UnmarshalerJSONObject. |
90 |
| -func (v *CallHierarchyRegistrationOptions) NKeys() int { return 3 } |
91 |
| - |
92 |
| -// compile time check whether the CallHierarchyRegistrationOptions implements a gojay.MarshalerJSONObject and gojay.UnmarshalerJSONObject interfaces. |
93 |
| -var ( |
94 |
| - _ gojay.MarshalerJSONObject = (*CallHierarchyRegistrationOptions)(nil) |
95 |
| - _ gojay.UnmarshalerJSONObject = (*CallHierarchyRegistrationOptions)(nil) |
96 |
| -) |
97 |
| - |
98 | 38 | // MarshalJSONObject implements gojay.MarshalerJSONObject.
|
99 | 39 | func (v *CallHierarchyPrepareParams) MarshalJSONObject(enc *gojay.Encoder) {
|
100 | 40 | enc.ObjectKeyOmitEmpty(keyTextDocument, &v.TextDocument)
|
|
0 commit comments