You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/03/26 17:23:26 UTC

[GitHub] [airflow] ashb edited a comment on issue #13934: EMR URI Parse Fails to resolve nested dict objects

ashb edited a comment on issue #13934:
URL: https://github.com/apache/airflow/issues/13934#issuecomment-808389284


   I think generally the extra should be encoded as query-string-escaped json, so:
   
   ```
   %7B%22a%22%3A%7B%22b%22%3A%221%22%2C%22c%22%3A%7B%22d%22%3A%222%22%7D%7D%2C%22e%22%3A%223%22%7D
   ```
   
   It's _unwieldly as anything_ 
   
   
   ```python console
   In [18]: conn = airflow.models.connection.Connection(uri='emr:///?foo=%7B%22a%22%3A%7B%22b%22%3A%221%22%2C%22c%22%3A%7B%22d%22%3A%222%22%7D%7D%2C%22e%22%3A%223%22%7D');                                                                             
   
   In [19]: conn.extra_dejson                                                                                                                                                                                                                           
   Out[19]: {'foo': '{"a":{"b":"1","c":{"d":"2"}},"e":"3"}'}
   ```
   
   Oh hmm, that's still a string.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org