charm
charm copied to clipboard
When writing a front-end and back-end application, my group elements become lists when they are passed between the front-end and back-end. How can I restore their data types?
"ct_1": {
'values': [
[1754408353300660201769792067151515537197304138139347579602259575436333375449389385780200841026805803428510681381298966868674903639440215772397057553203200, 4937713189799326763692415416511322522168138184769724648340830765335293994999255974062951748612093860834732747306285474285036828450992415045720023886725120],
[1138077534281167568969451498298922317492145904493948090505789310044723305233249399504082515991470896949586920293539395569378374816873987935707333883068416, 1284372767079919393143154899807497892297433067147668460149376827733763687337805735402113420266730080022874216507850345155516963957963114514450995558219776]
]
}
I think you can try to serialize the elements first before passing them, and then deserialize after receiving.
Serialize:
bytesString = group.serialize(element)
Deserialize:
element = group.deserialize(bytesString)