Closed kastolars closed 5 years ago
package context: jsonify (New)
jsonify
Given a filepointer and an interface, call ioutil.ReadAll with the filepointer, then json.Unmarshall the result to the interface.
filepointer
interface
ioutil.ReadAll
json.Unmarshall
*File
interface{}
We'll make the test a separate issue
Example logic of how the function body should work: https://github.com/SIGBlockchain/project_aurum/blob/dev/internal/config/config.go#L20
package context:
jsonify
(New)Given a
filepointer
and aninterface
, callioutil.ReadAll
with the filepointer, thenjson.Unmarshall
the result to theinterface
.jsonify
*File
and aninterface{}
as parametersioutil.ReadAll
from the file pointerjson.Unmarshall
the file data to theinterface
We'll make the test a separate issue
Example logic of how the function body should work: https://github.com/SIGBlockchain/project_aurum/blob/dev/internal/config/config.go#L20