Skip to content

Commit f7dfd08

Browse files
author
Gregor Gololicic
committed
add cadence json option for parsing
1 parent 6968001 commit f7dfd08

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

access/grpc/grpc.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ func NewBaseClient(url string, opts ...grpc.DialOption) (*BaseClient, error) {
5656
grpcClient := access.NewAccessAPIClient(conn)
5757

5858
return &BaseClient{
59-
rpcClient: grpcClient,
60-
close: func() error { return conn.Close() },
59+
rpcClient: grpcClient,
60+
close: func() error { return conn.Close() },
61+
jsonOptions: []json.Option{json.WithAllowUnstructuredStaticTypes(true)},
6162
}, nil
6263
}
6364

access/http/http.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,12 @@ func NewBaseClient(host string) (*BaseClient, error) {
156156
return nil, err
157157
}
158158

159-
return &BaseClient{handler: handler}, nil
159+
return &BaseClient{
160+
handler: handler,
161+
jsonOptions: []json.Option{
162+
json.WithAllowUnstructuredStaticTypes(true),
163+
},
164+
}, nil
160165
}
161166

162167
// BaseClient provides an API specific to the HTTP.

0 commit comments

Comments
 (0)