Added JSON-like synchronous API + fixed arrays