Debian Codegraph @

containers/serialization.go

raw symbols SCIP
1 // Copyright (c) 2015, Emir Pasic. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 package containers
6
7 // JSONSerializer provides JSON serialization
8 type JSONSerializer interface {
9 // ToJSON outputs the JSON representation of containers's elements.
10 ToJSON() ([]byte, error)
11 // MarshalJSON @implements json.Marshaler
12 MarshalJSON() ([]byte, error)
13 }
14
15 // JSONDeserializer provides JSON deserialization
16 type JSONDeserializer interface {
17 // FromJSON populates containers's elements from the input JSON representation.
18 FromJSON([]byte) error
19 // UnmarshalJSON @implements json.Unmarshaler
20 UnmarshalJSON([]byte) error
21 }