Adding unmarshal Tombstone

This commit is contained in:
Marius Orcsik 2019-05-12 20:13:06 +02:00
parent d8332178b9
commit 9255f5ce5d
No known key found for this signature in database
GPG key ID: 8218F7122969D484
2 changed files with 12 additions and 0 deletions

View file

@ -669,3 +669,11 @@ func FlattenProperties(it Item) Item {
}
return it
}
// UnmarshalJSON
func (t *Tombstone) UnmarshalJSON(data []byte) error {
t.Parent.UnmarshalJSON(data)
t.FormerType = ActivityVocabularyType(JSONGetString(data, "formerType"))
t.Deleted = JSONGetTime(data, "deleted")
return nil
}

View file

@ -516,3 +516,7 @@ func TestFlattenObjectProperties(t *testing.T) {
func TestFlattenProperties(t *testing.T) {
t.Skipf("TODO")
}
func TestTombstone_UnmarshalJSON(t *testing.T) {
t.Skipf("TODO")
}