Added support for "__type" type mark in input JSON