remodel json data for compatibility
This commit is contained in:
17
response.go
Normal file
17
response.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package tecaminodbmjson_data
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/tecamino/tecamino-dbm-json_data/models"
|
||||
)
|
||||
|
||||
func ParseResponse(b []byte) (*models.Response, error) {
|
||||
r := models.Response{}
|
||||
|
||||
err := json.Unmarshal(b, &r)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &r, nil
|
||||
}
|
Reference in New Issue
Block a user