I'm developing a quite complex contract with many state variables of all kinds. (mappings, arrays, uint, strings, bytes, etc).

For testing, it would be very useful to get a JSON (or similar) with the full state of the contract in a given moment.

I would like to know if there is an easy way to get this state from geth or web3.

Some thing like:

var currentState = web3.eth.getFullState([Contract address]);

It would be very good if this method works for any contract of any kind.