Nesting a pickled data blob inside a JSON document is not a very useful serialization format. Michael and I had to deal with this format in another context and it was quite a pain. The main problem is Pickle is a binary format and so it produces non-ASCII bytes which makes the JSON document have tons of escape characters, and so it is very difficult to copy and paste these values around from terminal and across SSH sessions.

I strongly recommend a different style of serialization. Do you actually need the pickling? It seems like you could load the model directly from JSON.