Skip to content
Snippets Groups Projects
Commit 9ee791a5 authored by thijsheijden's avatar thijsheijden
Browse files

Added message unmarshalling method

parent a18c4934
No related branches found
No related tags found
No related merge requests found
package query
import (
"encoding/json"
"git.science.uu.nl/datastrophe/query-conversion/entity"
)
/*
UnmarshalJSON takes an incoming message and unmarshals it
msg: *[]byte, the incoming message
Returns: *entity.IncomingQueryJSON, the unmarshalled message and a possible error
*/
func UnmarshalJSON(msg *[]byte) (*entity.IncomingQueryJSON, error) {
var JSONQuery entity.IncomingQueryJSON
err := json.Unmarshal(*msg, &JSONQuery)
return &JSONQuery, err
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment