William Petit
e66938f1d3
All checks were successful
Cadoles/bouncer/pipeline/head This commit looks good
18 lines
305 B
Go
18 lines
305 B
Go
package schema
|
|
|
|
import (
|
|
"encoding/json"
|
|
|
|
"github.com/pkg/errors"
|
|
"github.com/qri-io/jsonschema"
|
|
)
|
|
|
|
func Parse(data []byte) (*jsonschema.Schema, error) {
|
|
var schema jsonschema.Schema
|
|
if err := json.Unmarshal(data, &schema); err != nil {
|
|
return nil, errors.WithStack(err)
|
|
}
|
|
|
|
return &schema, nil
|
|
}
|