
    var artwork = {
      title: $title.val(),
      byline: $byline.val(),
      detailsUri: $detailsurl.val(),
      imageUri: $imageurl.val()
    };
    if ($attribution.val()) {
      artwork.attribution = $attribution.val();
    }

    if (!isEmpty($thumburl.val())) {
      artwork.thumbUri = $thumburl.val();
    }

    $json.val(JSON.stringify(artwork, null, 2));
  }

  function editorJsonToFields() {
    try {
      var artwork = JSON.parse($json.val());
      $title.val(artwork.title);
      $bylin