sorted out in/out json formats