@@ -193,122 +193,6 @@ var (
193
193
_ gojay.UnmarshalerJSONObject = (* LocationLink )(nil )
194
194
)
195
195
196
- // MarshalJSONObject implements gojay.MarshalerJSONObject.
197
- func (v * Diagnostic ) MarshalJSONObject (enc * gojay.Encoder ) {
198
- enc .ObjectKey (keyRange , & v .Range )
199
- enc .Float64KeyOmitEmpty (keySeverity , float64 (v .Severity ))
200
- enc .AddInterfaceKeyOmitEmpty (keyCode , v .Code )
201
- enc .ObjectKeyOmitEmpty (keyCodeDescription , v .CodeDescription )
202
- enc .StringKeyOmitEmpty (keySource , v .Source )
203
- enc .StringKey (keyMessage , v .Message )
204
- enc .ArrayKeyOmitEmpty (keyTags , DiagnosticTags (v .Tags ))
205
- enc .ArrayKeyOmitEmpty (keyRelatedInformation , DiagnosticRelatedInformations (v .RelatedInformation ))
206
- enc .AddInterfaceKeyOmitEmpty (keyData , v .Data )
207
- }
208
-
209
- // IsNil returns wether the structure is nil value or not.
210
- func (v * Diagnostic ) IsNil () bool { return v == nil }
211
-
212
- // UnmarshalJSONObject implements gojay's UnmarshalerJSONObject.
213
- func (v * Diagnostic ) UnmarshalJSONObject (dec * gojay.Decoder , k string ) error {
214
- switch k {
215
- case keyRange :
216
- return dec .Object (& v .Range )
217
- case keySeverity :
218
- return dec .Float64 ((* float64 )(& v .Severity ))
219
- case keyCode :
220
- return dec .Interface (& v .Code )
221
- case keyCodeDescription :
222
- if v .CodeDescription == nil {
223
- v .CodeDescription = & CodeDescription {}
224
- }
225
- return dec .Object (v .CodeDescription )
226
- case keySource :
227
- return dec .String (& v .Source )
228
- case keyMessage :
229
- return dec .String (& v .Message )
230
- case keyTags :
231
- return dec .Array ((* DiagnosticTags )(& v .Tags ))
232
- case keyRelatedInformation :
233
- values := DiagnosticRelatedInformations {}
234
- err := dec .Array (& values )
235
- if err == nil && len (values ) > 0 {
236
- v .RelatedInformation = []DiagnosticRelatedInformation (values )
237
- }
238
- return err
239
- case keyData :
240
- return dec .Interface (& v .Data )
241
- }
242
- return nil
243
- }
244
-
245
- // NKeys returns the number of keys to unmarshal.
246
- func (v * Diagnostic ) NKeys () int { return 9 }
247
-
248
- // compile time check whether the Diagnostic implements a gojay.MarshalerJSONObject and gojay.UnmarshalerJSONObject interfaces.
249
- var (
250
- _ gojay.MarshalerJSONObject = (* Diagnostic )(nil )
251
- _ gojay.UnmarshalerJSONObject = (* Diagnostic )(nil )
252
- )
253
-
254
- // DiagnosticTags represents a slice of DiagnosticTag.
255
- type DiagnosticTags []DiagnosticTag
256
-
257
- // MarshalJSONArray implements gojay.MarshalerJSONArray.
258
- func (v DiagnosticTags ) MarshalJSONArray (enc * gojay.Encoder ) {
259
- for i := range v {
260
- enc .Float64 (float64 (v [i ]))
261
- }
262
- }
263
-
264
- // IsNil implements gojay.MarshalerJSONArray.
265
- func (v DiagnosticTags ) IsNil () bool { return len (v ) == 0 }
266
-
267
- // UnmarshalJSONArray implements gojay.UnmarshalerJSONArray.
268
- func (v * DiagnosticTags ) UnmarshalJSONArray (dec * gojay.Decoder ) error {
269
- var value DiagnosticTag
270
- if err := dec .Float64 ((* float64 )(& value )); err != nil {
271
- return err
272
- }
273
- * v = append (* v , value )
274
- return nil
275
- }
276
-
277
- // compile time check whether the CodeActionKinds implements a gojay.MarshalerJSONArray and gojay.UnmarshalerJSONArray interfaces.
278
- var (
279
- _ gojay.MarshalerJSONArray = (* DiagnosticTags )(nil )
280
- _ gojay.UnmarshalerJSONArray = (* DiagnosticTags )(nil )
281
- )
282
-
283
- // MarshalJSONObject implements gojay.MarshalerJSONObject.
284
- func (v * DiagnosticRelatedInformation ) MarshalJSONObject (enc * gojay.Encoder ) {
285
- enc .ObjectKey (keyLocation , & v .Location )
286
- enc .StringKey (keyMessage , v .Message )
287
- }
288
-
289
- // IsNil returns wether the structure is nil value or not.
290
- func (v * DiagnosticRelatedInformation ) IsNil () bool { return v == nil }
291
-
292
- // UnmarshalJSONObject implements gojay's UnmarshalerJSONObject.
293
- func (v * DiagnosticRelatedInformation ) UnmarshalJSONObject (dec * gojay.Decoder , k string ) error {
294
- switch k {
295
- case keyLocation :
296
- return dec .Object (& v .Location )
297
- case keyMessage :
298
- return dec .String (& v .Message )
299
- }
300
- return nil
301
- }
302
-
303
- // NKeys returns the number of keys to unmarshal.
304
- func (v * DiagnosticRelatedInformation ) NKeys () int { return 2 }
305
-
306
- // compile time check whether the DiagnosticRelatedInformation implements a gojay.MarshalerJSONObject and gojay.UnmarshalerJSONObject interfaces.
307
- var (
308
- _ gojay.MarshalerJSONObject = (* DiagnosticRelatedInformation )(nil )
309
- _ gojay.UnmarshalerJSONObject = (* DiagnosticRelatedInformation )(nil )
310
- )
311
-
312
196
// MarshalJSONObject implements gojay.MarshalerJSONObject.
313
197
func (v * CodeDescription ) MarshalJSONObject (enc * gojay.Encoder ) {
314
198
enc .StringKey (keyHref , string (v .Href ))
0 commit comments