Cloning of objects - proper method

Hi!

What is the best way to create an exact copy of existing object?
You need to go through all the body properties, then all the fixtures and their properties etc, set up identical body def and fixture defs, then create. It's not too difficult but can be a bit tedious. You might be interested in this, source code available:
http://www.iforce2d.net/b2djson/#replicating
Thanks! Great tool!

Few lines of code can handle all b2d world.

Original thread: https://box2d.org/forum/viewtopic.php?t=8007