File tree Expand file tree Collapse file tree
libs/libcommon/src/libcommon/viewer_utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change 372372 {
373373 "$ref" : " #/components/schemas/TranslationVariableLanguagesFeature"
374374 },
375+ {
376+ "$ref" : " #/components/schemas/JsonFeature"
377+ },
375378 {
376379 "$ref" : " #/components/schemas/SequenceFeature"
377380 },
510513 }
511514 }
512515 },
516+ "JsonFeature" : {
517+ "type" : " object" ,
518+ "required" : [" _type" ],
519+ "properties" : {
520+ "_type" : {
521+ "type" : " string" ,
522+ "enum" : [" Json" ]
523+ },
524+ "decode" : {
525+ "type" : " boolean"
526+ }
527+ }
528+ },
513529 "SequenceFeature" : {
514530 "type" : " object" ,
515531 "required" : [" _type" , " feature" ],
669685 {
670686 "$ref" : " #/components/schemas/TranslationVariableLanguagesCell"
671687 },
688+ {
689+ "$ref" : " #/components/schemas/JsonCell"
690+ },
672691 {
673692 "$ref" : " #/components/schemas/SequenceCell"
674693 },
766785 }
767786 }
768787 },
788+ "JsonCell" : {
789+ "oneOf" : [
790+ {
791+ "$ref" : " #/components/schemas/ValueCell"
792+ },
793+ {
794+ "$ref" : " #/components/schemas/ListCell"
795+ },
796+ {
797+ "$ref" : " #/components/schemas/DictCell"
798+ }
799+ ]
800+ },
769801 "SequenceCell" : {
770802 "oneOf" : [
771803 {
Original file line number Diff line number Diff line change @@ -445,6 +445,8 @@ def get_cell_value(
445445 storage_client = storage_client ,
446446 json_path = json_path ,
447447 )
448+ elif isinstance (fieldType , Json ):
449+ return fieldType .decode_example (cell ) if fieldType .decode else cell
448450 elif isinstance (fieldType , list ):
449451 if not isinstance (cell , list ):
450452 raise TypeError ("list cell must be a list." )
@@ -535,7 +537,6 @@ def get_cell_value(
535537 Array5D ,
536538 Translation ,
537539 TranslationVariableLanguages ,
538- Json ,
539540 ),
540541 ):
541542 return cell
You can’t perform that action at this time.
0 commit comments