-
Notifications
You must be signed in to change notification settings - Fork 601
How to handle empty fields #240
Comments
Choosing between |
Ruh-roh—a |
This actually isn't |
the current harvesting tools have to make a special case in either approach null vs "" string. I would rather hope empty fields should not be included in the json. |
I think the full question is between three possibilities: As for JSON Schema which is currently the main basis for validation, we could add I haven't dug into the current state of JSON Schema enough to see how much an option for specifying |
Sorry, didn't mean to click "Close & Comment" just "Close" I've done that more than once. It seems like it'd be better if "Close" turned into just a checkbox to make it harder to accidentally close when you just wanted to comment - or maybe have the button be colored red to make it more obvious. Its surprisingly easy to quickly click a normal looking button with the word "comment" in it. @benbalter where can I file a ticket for that? ;) |
agree with conclusions thus far.
my opinion
On Jan 3, 2014, at 5:35 PM, Philip Ashlock [email protected] wrote: Sorry, didn't bean to click "Close & Comment" just "Close" I've done that more than once. It seems like it'd be better if "Close" was — |
You're likely to see empty arrays as well. It's all well and good to say how thing should be, it's better to make your code not fail when it sees something that you wish were not there. So yes, encourage people to use null rather than an empty string (or an empty array), but treat all of those values the same. Have you seen some of the other problems that are in some data.json files? This is not a major problem! |
You're right - I think what's at issue here is what the guidance to agencies should be. There seems to be strong consensus here, so I've put forth pull request #260 for that. |
Here's a commit to update the JSON schema with the flexibility to use null on non-required fields: |
A question for folks: An issue that's come up a good bit as we begin harvesting agency public data listings is whether to dictate how to handle empty fields. Take for example, the webservice field. There is of course the scenario where it's populated:
But there are plenty of other times when it's convenient for the field to still be in the record even when it's unpopulated. So far, I've seen this happen two ways:
with a null value:

or with empty quotation marks:

Should one or either of these be acceptable from a validation and harvesting perspective?
@konklone, @benbalter, @waldoj, @kinlane, @philipashlock, @dwcaraway, @kvuppala, @FuhuXia - can you weigh in?
The text was updated successfully, but these errors were encountered: