-2

I'm trying to make a Bytecode VM in python just for fun, as a hobby project, but i have a problem, how i can encode a json file like this:

{
 "code": [["0xf2", "Hello"], ["0xf3", 1]],
 "constants": []
}

into some file format, something like encrypting, but in some way that it doesn't get so random, i need something more readable but encrypted at the same time.

Isaac Vinícius
  • 21
  • 1
  • 11

1 Answers1

1

Encoded files and human-readable files are not always compatible. However, I believe that BSON, an encoded JSON variant, is a good solution to your problem.

Rafael de Bem
  • 641
  • 7
  • 15