Fixed a bug: now json is also valid if mixed types are used an some output is empty.