Improve relationship type json