Implemented json handler in Ajax requests.