c# core: fix when state is direct json