How to handle empty field for a LRMI JSON response.

29 views
Skip to first unread message

si.b...@gmail.com

unread,
Feb 3, 2015, 8:20:11 PM2/3/15
to lr...@googlegroups.com
Hi,

Out of the pool of resources in our system some do not have all LRMI fields.

How is the best way to display an empty field?
Examples:

  • educationalAlignmentnull,
  • educationalAlignment"N/A",
  • educationalAlignment"",

Thanks

Steve Midgley

unread,
Feb 3, 2015, 11:22:33 PM2/3/15
to lr...@googlegroups.com
Do you mean to indicate that the field exists but no value is present (ie exists but empty)? Or do you mean to say simply that there is no information for this field?

If the former, I would recommend using double quotes ""

If the latter, I would recommend not including the field at all. LRMI and schema.org fields are not required, generally speaking.

I would say that by far the most common case is to simply not include a field if you have no information. If you are including the field with empty quotes, then you are doing it for a specific and somewhat esoteric reason, IMO.

Steve


--
You received this message because you are subscribed to the Google Groups "Learning Resource Metadata Initiative" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lrmi+uns...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Phil Barker

unread,
Feb 4, 2015, 4:46:32 AM2/4/15
to lr...@googlegroups.com
Hello
All LRMI properties are optional, so I would suggest that the best way to handle empty fields is like this:


:)
Do you have any reason for including the key when you have no value for it?

Phil Barker
http://people.pjjk.net/phil
--
You received this message because you are subscribed to the Google Groups "Learning Resource Metadata Initiative" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lrmi+uns...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.




We invite research leaders and ambitious early career researchers to join us in leading and driving research in key inter-disciplinary themes. Please see www.hw.ac.uk/researchleaders for further information and how to apply.

Heriot-Watt University is a Scottish charity registered under charity number SC000278.

Stuart Sutton

unread,
Feb 4, 2015, 7:01:16 AM2/4/15
to LRMI
I agree with Steve's analysis but would say in all cases where data is widely distributed that if there is no value in a resource description for a particular property, don't include that property at all in the resource description.  Absent some agreement among downstream systems consuming your metadata on how to interpret values signaling nothingness (e.g., "N/A"), such values are basically useless.  If a property is present in a resource description, it should contain data that is semantically useful--i.e., conforms to the definition of the property's value. If a property is missing, that's that, nothing to say, nothing for a downstream system to try and figure out., nothing to try and handle in indexed fields. Also, in downstream systems where property values are strongly typed (e.g.,a date datatype), things like "N/A" in a date field could cause a metadata record to not validate at worst or look like nonsense in an indexed property at best.

My opinion is certainly not universally held.

Stuart

Renato

unread,
Feb 4, 2015, 7:02:12 AM2/4/15
to lr...@googlegroups.com
Hello everybody,

May I suggest a possible reason: existential selection.

As an example, you may use Google CSE to filter items where the property exists, even if you are not necessarily interested in its actual value.

If this property exists, you may deduce that the item is (describes) a learning resource.

Best,
Renato

Joshua Marks

unread,
Feb 4, 2015, 1:10:56 PM2/4/15
to lr...@googlegroups.com
I agree with Stuart here, and I guess Steve too then. While technically you can tag the property and leave it null, that has little value and can be counter productive in terms of how to interpret that emptiness. I would suggest leavening the property out unless you have a meaningful value for it.

-Joshua 
Reply all
Reply to author
Forward
0 new messages