Extract to json method from NonEncodedFactoryBuilder