This commit is contained in:
erik 2023-12-22 14:52:10 +01:00 committed by Michael Jerger
parent 7d78fb8adc
commit 8585edc47a
4 changed files with 109 additions and 110 deletions

View file

@ -42,12 +42,12 @@ func StarNew(id ap.ID, ob ap.ID) *Star { // ToDo: May be used later in creating
return &o
}
func (a Star) MarshalJSON() ([]byte, error) {
func (s Star) MarshalJSON() ([]byte, error) {
b := make([]byte, 0)
ap.JSONWrite(&b, '{')
ap.JSONWriteStringProp(&b, "source", string(a.Source))
if !ap.JSONWriteActivityValue(&b, a.Activity) {
ap.JSONWriteStringProp(&b, "source", string(s.Source))
if !ap.JSONWriteActivityValue(&b, s.Activity) {
return nil, nil
}
ap.JSONWrite(&b, '}')