[Openid-specs-ab] [openid/connect] Messages 2.5.2 - Example for accessing language-tagged claims (issue #810)

Justin Richer issues-reply at bitbucket.org
Thu Mar 14 19:23:51 UTC 2013

--- you can reply above this line ---

New issue 810: Messages 2.5.2 - Example for accessing language-tagged claims

Justin Richer:

The use of the hashtag (#) to mark language/script in human-readable claims doesn't play well with object-based field access in most programming languages. While this is still a valid JSON member name, and all languages have *some* means of accessing the values, there is an inherent limitation in what many programmers will expect to be available for their parsed objects.

So for the JSON: 

 { "client_name": "Test Client", "client_name#en-us": "Test Client" }

You get a JSON object with two members, one of which can be access as:

  object.client_name => "Test Client"

or its equivalent. But the other must be accessed as:

  object["client_name#en-us"] => "Test Client"

or its equivalent. 

To combat this, we could change how we do language tags (not really a good idea, because the "-" character is also invalid in many languages for a member name), or we could simply add a quick example in a common programming language, like JavaScript, to call out this limitation.


This is an issue notification from bitbucket.org. You are receiving
this either because you are the owner of the issue, or you are
following the issue.

More information about the Openid-specs-ab mailing list