Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: f9fa00236d
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (25 sloc) 0.628 kB
package tripit
// This file was generated by a tool. Do not edit.
import (
"encoding/json"
)
// A specialization of Vector for ClosenessMatch objects
type ClosenessMatchVector []ClosenessMatch
func (p *ClosenessMatchVector) UnmarshalJSON(b []byte) error {
var arr *[]ClosenessMatch
arr = (*[]ClosenessMatch)(p)
*arr = nil
err := json.Unmarshal(b, arr)
if err != nil {
*arr = make([]ClosenessMatch, 1)
err := json.Unmarshal(b, &(*arr)[0])
if err != nil {
if err2, ok := err.(*json.UnmarshalTypeError); ok && err2.Value == "null" {
*arr = (*arr)[0:0]
} else {
return err
}
}
}
return nil
}
Jump to Line
Something went wrong with that request. Please try again.