Feature/json request

Couldn't these conditions be `&&` together?