Lines Matching full:annotator
11 type Annotator struct { struct
12 Annotator string member
17 // UnmarshalJSON takes an annotator in the typical one-line format and parses it into an Annotator …
19 func (a *Annotator) UnmarshalJSON(data []byte) error { argument
20 // annotator will simply be a string
27 return fmt.Errorf("failed to parse Annotator '%s'", annotatorStr)
31 a.Annotator = annotatorFields[1]
36 // MarshalJSON converts the receiver into a slice of bytes representing an Annotator in string form.
38 func (a Annotator) MarshalJSON() ([]byte, error) { argument
39 if a.Annotator != "" {
40 return json.Marshal(fmt.Sprintf("%s: %s", a.AnnotatorType, a.Annotator))