Commit d5192378d388d41c65898fc66ac5739fffc674f1

Authored by Marko Tikvić
1 parent e77b75ec6c
Exists in master and in 1 other branch v2

added json decoding shorthand

Showing 1 changed file with 3 additions and 0 deletions   Show diff stats
... ... @@ -175,3 +175,6 @@ func fetchJSON(db *ora.Ses, project string) ([]byte, error) {
175 175 return bytes, nil
176 176 }
177 177  
  178 +func DecodeJSON(r io.Reader, v interface{}) error {
  179 + return json.NewDecoder(r).Decode(v)
  180 +}
... ...