fix json, add tests for name search