(ns weepinbell.metadata.json-ld "JSON-LD parser that finds JSON-LD string in a hickroy document and then tries to convert it to a JF2 object." (:require [weepinbell.metadata.html-head :refer [get-child]] [cheshire.core :as json])) (defn- find-json-ld [hickory] (->> hickory (get-child :html) (get-child :head) :content (filter #(and (= (:tag %) :script) (= "application/ld+json" (get-in % [:attrs :type])))) first :content first)) (defn parse-json-ld "Takes hickory document, finds