jscheffl commented on PR #44869:
URL: https://github.com/apache/airflow/pull/44869#issuecomment-2539052383

   > Thanks @jscheffl, here is one rough attempt I can think of. Pass 
`stringify: false` in the API. Try `JSON.stringify()` and set highlight to true 
to use `<SyntaxHighlighter />`. On error just convert to string using 
`String()` and set highlight to be false to render it as normal `<Text>`. But 
this also means if there is `__str__` implemented for the custom object in 
Python land then JS `String()` value might be different in case the object 
doesn't fit `JSON.stringify`.
   > 
   > 
![image](https://private-user-images.githubusercontent.com/3972343/395181638-6bda7f56-f687-47a2-827c-7bfa0d1cc760.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzQwMTI2MzAsIm5iZiI6MTczNDAxMjMzMCwicGF0aCI6Ii8zOTcyMzQzLzM5NTE4MTYzOC02YmRhN2Y1Ni1mNjg3LTQ3YTItODI3Yy03YmZhMGQxY2M3NjAucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MTIxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDEyMTJUMTQwNTMwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9M2M4Y2ZhODY4ZTE0NTk2NjVlMDU4NDI4YjZiYjhiM2E1NjQzMGI0Zjg2ZmZmNWI4ZDYyYmJlZjNhODgxNDAzOCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.loqThpXc82g86JH8Y6JPjQ-dYB5l2HLEU9okqUwSD94)
   
   Yeah, but this is only rough :-) Then rather to it "right" in a follow-up PR 
:+1: 


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to