Use constant for empty Term value

This commit is contained in:
Marius Orcsik 2018-08-06 13:09:38 +02:00
parent b4ab90daff
commit c76d5dd269
No known key found for this signature in database
GPG key ID: 889CE8E4FB2D877A
2 changed files with 3 additions and 1 deletions

View file

@ -98,6 +98,8 @@ var keywords = Terms{
VocabKw,
}
const NullTerm Term = "-"
type ContextObject struct {
ID interface{} `jsonld:"@id,omitempty,collapsible"`
Type interface{} `jsonld:"@type,omitempty,collapsible"`

View file

@ -21,7 +21,7 @@ func TestRef_MarshalText(t *testing.T) {
func TestContext_MarshalJSON(t *testing.T) {
url := "test"
c := Context{"_": IRI(url)}
c := Context{NullTerm: IRI(url)}
//c.Language = "en-GB"
out, err := c.MarshalJSON()