Constellation, Spacedust, Slingshot, UFOs: atproto crates and services for microcosm

put $type in array path

nothing is escaped, unclear how universal the $type convention is, etc.

Changed files
+20 -8
link_aggregator
links
src
+12 -3
links/src/record.rs
··· 10 10 } 11 11 } 12 12 JsonValue::Array(a) => { 13 - let p = format!("{path}[]"); 14 13 for child in a { 15 - walk_record(&p, child, found) 14 + let child_p = match child { 15 + JsonValue::Object(o) => { 16 + if let Some(JsonValue::String(t)) = o.get("$type") { 17 + format!("{path}[{t}]") 18 + } else { 19 + format!("{path}[]") 20 + } 21 + } 22 + _ => format!("{path}[]"), 23 + }; 24 + walk_record(&child_p, child, found) 16 25 } 17 26 } 18 27 JsonValue::String(s) => { ··· 145 154 Link::Uri("https://youtu.be/oKXm4szEP1Q?si=_0n_uPu4qNKokMnq".into()), 146 155 ), 147 156 l( 148 - ".facets[].features[].uri", 157 + ".facets[].features[app.bsky.richtext.facet#link].uri", 149 158 Link::Uri("https://youtu.be/oKXm4szEP1Q?si=_0n_uPu4qNKokMnq".into()), 150 159 ), 151 160 ]