Lucas_Werkmeister_WMDE added a comment.

  Because the data value is in the same format that you get back when you 
retrieve the entity data. We sometimes allow for some redundancy (mainly for 
backwards compatibility, I believe) – for example, both of these values
  
    {
      "entity-type": "item",
      "numeric-id": 5
    }
  
    {
      "id": "Q5"
    }
  
  will get you
  
    {
      "entity-type": "item",
      "numeric-id": 5,
      "id": "Q5"
    }
  
  in the entity data. (At least the entity data you get out of the API or 
Special:EntityData. I don’t know if we actually store the redundant bits 
internally.) But I’m not aware of any place where we try to “clean up” the 
value beyond that (e.g. by allowing `"  Q5 "` in the `"id"`). And I think it 
would be reasonable for API users to expect that if they pass a data value into 
the low-level API, and it’s accepted, then they will get it back unmodified. 
(`wbparsevalue` would be the higher-level API that’s “allowed” to do 
normalization.)

TASK DETAIL
  https://phabricator.wikimedia.org/T251480

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Lucas_Werkmeister_WMDE
Cc: Lucas_Werkmeister_WMDE, Ladsgroup, Manuel, Lydia_Pintscher, Addshore, 
Raymond, Multichill, Reedy, Aklapper, Herzi.Pinki, Invadibot, maantietaja, 
Akuckartz, Iflorez, alaa_wmde, Nandana, lucamauri, Lahi, Gq86, 
GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, 
Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org
To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org

Reply via email to