mirror of
https://github.com/grafana/grafana.git
synced 2025-09-25 10:44:00 +08:00

* Add 'JSON' field type to ConvertFieldTypeTransformer I've been playing around with #41994 and found that it requires fields to contain array values, which can't be sent from a backend plugin. This PR adds the ability for the ConvertFieldTypeTransformer to parse JSON values and store the result in the transformed field. The main use case for this right now is so that a field containing a JSONified array can be transformed into a field containing an actual array, which can in turn be used for the table charts in #41994. Supersedes #42521. * Add second option to complex field conversion to increase flexibility This avoids falsely equating 'JSON' with FieldType.other, and instead allows multiple parsers to be used if the 'Complex' type is selected. Currently only JSON parsing is implemented, but others could be supported easily in future. * Revert "Add second option to complex field conversion to increase flexibility" This reverts commit 6314ce35eb6d8136c8e238abd2279cfa50ef3cc2. * Improve test for object parsing of complex field transformer Co-authored-by: Ryan McKinley <ryantxu@gmail.com>