2017-09-12 18:02:30 +02:00
|
|
|
package claim
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/golang/protobuf/jsonpb"
|
|
|
|
)
|
|
|
|
|
2017-11-08 03:39:08 +01:00
|
|
|
func marshalToString(claim *ClaimHelper) (string, error) {
|
|
|
|
m_pb := &jsonpb.Marshaler{}
|
|
|
|
return m_pb.MarshalToString(claim)
|
2017-09-12 18:02:30 +02:00
|
|
|
}
|
2017-11-08 03:39:08 +01:00
|
|
|
|
|
|
|
func (claim *ClaimHelper) RenderJSON() (string, error) {
|
|
|
|
return marshalToString(claim)
|
|
|
|
}
|
|
|
|
|
|
|
|
//TODO: encode byte arrays with b58 for addresses and b16 for source hashes instead of the default of b64
|