nicer pattern matching for jsonline