I've done a bit of work on model-based testing in the past, and I've played with a couple different ways to get the states for testing.
One approach I've used is to run TLC with the -dot flag which will output the graph of states to a .dot file. You should then be able to find a dotfile parser to parse the states and could even convert them to JSON from there.
Alternatively, the community modules[1] include a JSON module which you can use to encode states to JSON. You can write a next state action to serialize whatever state you're interested in and append it to a file.
All that said, it's been quite some time since I last worked on this problem, so it's entirely possible the community has developed a more elegant solution for getting the states and I've just missed it. I'm sure others will chime in if that's the case.