fix some methods returning str instead of json, expect JSON as return for tests