very preliminary json support implemented