Adding unmarshal Tombstone
This commit is contained in:
parent
d8332178b9
commit
9255f5ce5d
2 changed files with 12 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
|
|
Reference in a new issue