Repository navigation
Clients Library
KHost.Mobile.Clients is the standalone library for every outward-facing lookup the app makes: playlist import, metadata auto-fill, cover-art/spelling fallback, lyrics, and the update check. It has no MAUI dependency, and every feature follows the same four-piece shape (see below).
-
net10.0, no MAUI. ReferencesMicrosoft.Extensions.Http, so the library can register its own typedHttpClients; otherwise pure BCL (System.Net.Http,System.Text.Json,System.Text.RegularExpressions). -
Every service implementation is
internal sealed—ITunesTrackMetadataLookup,DeezerCoverArtLookup,DeezerSpellingSuggestionLookup,LrcLibLyricsClient,GitHubReleaseClient,SpotifyImportService,YouTubeMusicImportService. Only the Abstractions interfaces, result types and exceptions are public, so a caller names the capability and never learns which vendor answered. Most parsers/matchers follow suit asinternal static(ITunesResponseParser,DeezerCoverArtParser,DeezerSuggestionParser,DeezerArtistMatcher,LrcLibResponseParser,GitHubReleaseParser,VersionTag, everyMatching/type) — the Spotify/YouTube Music playlist-URL and embed parsers (SpotifyPlaylistUrl,SpotifyEmbedParser,YouTubeMusicPlaylistUrl,YouTubeMusicPlaylistParser) staypublic.KHost.Mobile.Clients.csprojgrants<InternalsVisibleTo>to bothKHost.Mobile.UnitTestsandKHost.Mobile.IntegrationTests, which is how the internal parsers stay reachable by test. - A platform MAUI head can reference a plain
net10.0library, but not the reverse. Keeping the boundary one-directional is whyHttpClientis injected into every client type rather thannew'd — viaAddKHostClients(src/KHost.Mobile.Clients/Project.cs), the library's own registration extension. A head calls it once, passing theUser-Agentstring (the library can't read the app's own version) and an optionalconfigureHandlercallback the head uses to chain its own logging handler onto every client — the library itself does no logging. - See Architecture for how this library sits in the overall layering, and Conventions for the house style these patterns are drawn from (
AGENTS.md→ "Pattern: client backend").
Contracts and backends live in different projects. The vendor-neutral interfaces, result types and exceptions are in src/KHost.Mobile.Abstractions/Clients/ (Metadata/, CoverArt/, Lyrics/, Updates/); this library holds only the implementations, one folder per vendor (Apple/, Deezer/, LrcLib/, GitHub/, Spotify/, YouTubeMusic/) plus the internal Matching/ helpers they share. JsonElementExtensions lives in src/KHost.Mobile.Common/Json/. A new backend is a new folder here — never a change to Abstractions. Every feature follows the same four-piece shape:
| Piece | Role |
|---|---|
IFoo interface |
The public contract; <summary> documents what "no result" vs. an exception means. |
Foo implementation |
HttpClient injected via primary constructor (never new'd). Does HTTP + status-code error mapping only — no parsing logic. |
FooParser (static) |
"Pure — no network." Turns a response string into the DTO. Manual JsonDocument traversal — no reflection serializer (that's the host's convention, System.Text.Json source-gen, not the client's). |
FooException |
One sealed class FooException(string message, Exception? inner = null) : Exception(message, inner) per feature, message written to be shown directly in the UI. |
Registered as a typed client inside AddKHostClients (src/KHost.Mobile.Clients/Project.cs): Add(services.AddHttpClient<IFoo, Foo>(...)), where the local Add helper runs whatever configureHandler the host passed in. The host calls AddKHostClients once, from src/KHost.Mobile/MauiProgram.cs: builder.Services.AddKHostClients(userAgent, http => http.AddHttpMessageHandler<LoggingHttpMessageHandler>()).
| Feature | Interface | Implementation | Upstream endpoint | Auth | Returns | Exception |
|---|---|---|---|---|---|---|
| Metadata auto-fill | ITrackMetadataLookup |
Apple/ITunesTrackMetadataLookup.cs |
itunes.apple.com/search |
Keyless, rate-limited (~20 req/min) |
TrackLookupResult (a TrackMetadata match, a TrackSuggestion, or neither) |
MetadataLookupException |
| Cover-art fallback | ICoverArtLookup |
Deezer/DeezerCoverArtLookup.cs |
api.deezer.com/search |
Keyless, ~50 req/5s per IP |
string? (an absolute cover URL, or null) |
CoverArtLookupException |
| Spelling-suggestion fallback | ISpellingSuggestionLookup |
Deezer/DeezerSpellingSuggestionLookup.cs |
api.deezer.com/search |
Keyless, ~50 req/5s per IP | TrackSuggestion? |
(never throws — see below) |
| Lyrics | ILyricsLookup |
LrcLib/LrcLibLyricsClient.cs |
lrclib.net/api/search |
Keyless | LyricsResult? |
LyricsLookupException |
| Spotify playlist import | ISpotifyImportService |
Spotify/SpotifyImportService.cs |
open.spotify.com/embed/playlist/{id} |
Keyless (public embed page) | SpotifyPlaylistImport |
SpotifyImportException |
| YouTube Music playlist import | IYouTubeMusicImportService |
YouTubeMusic/YouTubeMusicImportService.cs |
music.youtube.com/playlist?list={id} |
Keyless (public page) | YouTubeMusicPlaylistImport |
YouTubeMusicImportException |
| Update check | IUpdateLookup |
GitHub/GitHubReleaseClient.cs |
api.github.com/repos/riddlemd/KHost.Mobile/releases |
Keyless (anonymous GitHub REST API) | ReleaseInfo? |
(never throws — degrades to null) |
ITunesTrackMetadataLookup.LookupAsync(title, artist) builds:
https://itunes.apple.com/search?term={artist} {title}&entity=song&limit=25&country={region}
-
termis built fromTrackTextNormalizer.Normalize-d text, not the raw string — iTunes' typo tolerance breaks on punctuation ("All Time Low Dear Maria, Count Me Inn"returns nothing; the same query without the comma finds it). The parser re-verifies every candidate against the raw title/artist regardless, so this is safe. -
limit=25, not the top hit: iTunes ranks by popularity, so a cover can outrank the real recording. -
countrycomes fromILookupOptions.CatalogueRegion(defaultUS) — it decides which catalogue answers at all; a local-language artist can simply be absent from another region's catalogue. -
ITunesResponseParser.ParseBestMatchwalksresults[]and only trusts a row where bothtrackNameandartistNamenormalize-equal the request — a right-title/wrong-artist cover (or vice versa) is rejected. First such row wins;releaseDate("2004-06-08T07:00:00Z") is sliced to its leading 4 digits forYear, andartworkUrl100is rewritten toartworkUrl300(the dimensions are just path text) to serve a sharper image without inflating the base64-encoded cache. - No exact match → falls through to
TrackSuggestionFinder.Bestfor a near-miss suggestion (see Matching below). - HTTP 403 or 429 →
MetadataLookupException("Lookups are rate-limited right now — wait a moment and try again.").
Fallback consulted only when iTunes returns no cover — its field-scoped query surfaces album deep cuts iTunes' popularity ranking misses. The ordering is not decided here: SongEnricher (Infrastructure) owns which source is asked and when, so these backends stay independent of each other.
https://api.deezer.com/search?q=artist:"{artist}" track:"{title}"&limit=10
- The quotes keep a multi-word title/artist together in Deezer's field-scoped syntax.
-
Art only. Deezer's
release_dateis the digital-availability date, not the original release, so year/genre always stay with iTunes;SongListItem.ArtworkLookedUpgates re-lookup. -
DeezerCoverArtParserrequires bothtitleandartist.nameto match. Artist matching goes throughDeezerArtistMatcher(see below), not plain equality — it accepts real-world variants like"White Stripes"vs"The White Stripes". - Deezer signals quota/other faults as a 200 response with an
"error"object, not an HTTP status — the parser checks for that key first and treats it as "no cover", same as a genuine miss. - Picks the first available field from
cover_big→cover_xl→cover_medium→cover_small→cover(500×500 is "sharp enough without bloating the cached image"). - HTTP 429 →
CoverArtLookupException("Deezer cover-art lookups are rate-limited right now.").
Tokenizes both artist strings (lowercased, accent-stripped via TrackTextNormalizer.Normalize, then splits on spaces and drops the stop-words the/and/a), and accepts:
- an exact token-set match, or
- a subset match either direction, as long as the shorter side has ≥2 meaningful tokens — that admits
"Hall & Oates"⊆"Daryl Hall & John Oates"while rejecting a single-token coincidence ("Prince"⊄"Prince Royce") or a same-first-name mismatch ("Bo Burnham"vs"Bo Hazard").
Fallback consulted only when iTunes offered neither a match nor its own suggestion, and only when the cover-art search also came up empty — a cover found by exact title+artist proves the spelling is already right. SongEnricher (Infrastructure) applies that gate; this backend just answers when asked.
https://api.deezer.com/search?q={artist} {title}&limit=10
-
Plain free-text, not the field-scoped
artist:"…" track:"…"form the cover-art lookup uses: the field-scoped query is exact-only (a typo returns zero results), while plain free-text is typo-tolerant ("Radiohead Creap"→"Creep — Radiohead"). This is a separate HTTP call, not a second reading of the cover-art response. -
Never throws.
SuggestAsynccatchesHttpRequestException/TaskCanceledExceptionand returnsnull(afterThrowIfCancellationRequested()for a genuine caller cancel) — this is a hint, so a rate limit, a network blip, or an unusable payload all degrade silently rather than surfacing to the caller. (IUpdateLookupis the library's other "never throws" contract — see below.) - Parsing reuses
DeezerArtistMatcher.Matchesas the suggestion path's artist-variant tolerance, so a band-name variant anchors a match instead of being reported as a misspelling.
Base address (https://lrclib.net/) and the fair-use-required User-Agent are set once, inside AddKHostClients (src/KHost.Mobile.Clients/Project.cs), using the userAgent string the host passes in — the header is built here, but the version string behind it comes from the host, which is the only side that can read the app's own version:
api/search?q={artist} {title}
-
LrcLibResponseParser.ParseFirsttakes the first record that actually carries lyrics (plainLyricsnon-blank) or is flaggedinstrumental— not just the first hit outright — so a metadata-only row doesn't win over a later one with a real lyrics body. If nothing in the response carries lyrics, it falls back to the first result anyway (matched title/artist shown, no body). -
SyncedLyrics(time-synced LRC) is parsed ontoLyricsResultbut unused today — kept for a possible future synced view. - HTTP 404 →
null, "no match", not an error (the response is disposed either way to release the pooled connection). HTTP 429 →LyricsLookupException("Lyrics lookups are rate-limited right now — wait a moment and try again."). - See Lyrics & quick links for the on-device caching layer (
ILyricsCache) that sits in front of this client in the host.
Backend: the public embed page, not an authenticated API — open.spotify.com/embed/playlist/{id}, which renders its tracklist server-side and serves a stripped page to non-browser clients. Every request sets a normal desktop-Chrome User-Agent per-request (SpotifyImportService.BrowserUserAgent), so the injected HttpClient itself needs no special configuration.
-
SpotifyPlaylistUrl.TryParseIdaccepts a web URL (open.spotify.com/playlist/{22-char-id}?si=…), aspotify:playlist:{id}URI, or a bare 22-char base62 id. -
SpotifyEmbedParserextracts the<script id="__NEXT_DATA__" type="application/json">…</script>blob and searches it by property name (trackList) rather than a fixed nesting path, since the embed player's Next.js prop shape is unofficial and can shift between Spotify deploys. A titleless row is skipped defensively. - Each track's
subtitlefield is the artist string; the Spotify track id is parsed offuri(spotify:track:{id}), kept for a possible future de-dupe/library-linking step. -
Capped at ~100 tracks — the embed has no pagination without a token.
LikelyTruncatedis set (not "was truncated", since the real total is unknowable) when the raw list hit that ceiling. - HTTP 404 →
SpotifyImportException("That playlist couldn't be found — make sure it's public."). - A data blob that is present but unparseable (a truncated or reshaped response) is wrapped as
SpotifyImportExceptiontoo, not left to escape as a rawJsonException— the import UI catches the domain exception and nothing else.
Backend: the public playlist page (music.youtube.com/playlist?list={id}), page-scraped — no API key. Every request sets a browser User-Agent plus Accept-Language: en-US,en;q=0.9 (for stable English titles).
-
YouTubeMusicPlaylistUrl.TryParseIdaccepts a?list=…query onmusic.youtube.com/youtube.com, abrowse/VL{id}link (theVLbrowse-endpoint prefix is stripped), or a bare id (13+ chars, to avoid confusing an 11-char video id for a playlist id). - The page embeds its data as
initialData.push({ …, data: '<JS-escaped JSON>' })— a single-quoted JS string with\xNN/\uNNNNescapes, soYouTubeMusicPlaylistParserhand-scans for the first unescaped quote to find the string body, then JS-unescapes it before it's valid JSON at all (JsUnescape). A page can carry several such blobs; the parser tries each and keeps whichever parses to the most track rows. - Tracks are read from
musicResponsiveListItemRenderer.flexColumns[]— column 0 is the title, column 1 the artist — found by walking the tree for that property name so a layout shuffle doesn't break it. Rows without a resolvableVideoId(checked first onplaylistItemData.videoId, falling back to a tree search for awatchEndpoint.videoId) are dropped. -
LikelyTruncatedis true when the parsed JSON contains acontinuationItemRenderernode — the presence of a continuation token, not a track count, is what signals more pages exist (YouTube's internal continuation API isn't called). - Playlist name comes from
<title>…</title>, HTML-decoded, with a trailing" - YouTube Music"/" - YouTube"suffix stripped. - A private/invalid playlist still returns HTTP 200 with an error state baked into the page — that's caught by the parser's "no tracks found" check, not treated as a transport error; a genuine non-200 status is what maps to
YouTubeMusicImportException.
Base address (https://api.github.com/), User-Agent, and Accept: application/vnd.github+json are set the same way, inside AddKHostClients (GitHub's REST API rejects a request with no User-Agent).
repos/riddlemd/KHost.Mobile/releases?per_page=20
- Newest ~20 releases (already newest-first) is enough to find the highest version.
-
GitHubReleaseParser.ParseNewestskipsdraftreleases but keeps pre-releases (every current build is a preview). It re-derives the max by parsing eachtag_nameinto aSystem.Versionrather than trusting the feed's declared order. The parsing isVersionTag.TryParse(GitHub/VersionTag.cs), which strips a leadingv/Vand any-prerelease/+buildsuffix —v0.4.0-beta.1→0.4.0. It is internal to this folder: a release tag is a GitHub convention, and nothing else in the app produces one. -
ReleaseInfo.Versionis the already-parsedSystem.Version, not the raw tag, so a caller compares rather than re-parses. -
The app's own version is parsed by a different rule.
IAppVersionParser/AppVersionParser(src/KHost.Mobile.Infrastructure/Services/AppVersionParser.cs, injected —MauiAppUpdateServicetakes it via its primary constructor) readsApplicationDisplayVersionand ignores a-prerelease/+buildsuffix — a suffixedversionNameis ordinary on an Android dev build, and refusing one would silently disable the update check on exactly those builds — but it does not strip a leadingv, because that is a git-tag convention and iOS requiresCFBundleShortVersionStringto be period-separated digits. The two-line overlap withVersionTagstays duplicated rather than shared:VersionTagis internal to Clients, which sits below Infrastructure, so sharing it would invert the layering. -
Never throws — a network/HTTP failure or empty/unparseable feed all return
null("nothing new"), matching the update check's best-effort nature; the user-facing switch is Settings → "Enable Update Notifications".
Three internal, pure (no-network) types shared by every "did you mean…?" path (iTunes's own suggestion and both Deezer fallbacks):
TrackTextNormalizer.Normalize(value) — lowercases, strips parenthetical/bracketed asides ("(feat. X)", "(Remastered 2011)", "[Live]"), cuts at a trailing qualifier (" feat.", " feat ", " featuring ", " ft. ", " ft ", " - "), strips accents (Unicode NormalizationForm.FormD + drop NonSpacingMark), folds every remaining non-alphanumeric char to a space, and collapses whitespace. StripAsides(value) is the display-safe sibling — drops the same bracketed asides but leaves case/punctuation intact, for text that will be shown or written back rather than compared.
TrackSimilarity.TypoEdits(candidate, wanted) — both inputs already normalized. Returns the Levenshtein edit distance when it's small enough to read as a typo, else null:
-
MaxEdits = 2— more than 2 edits is a different word, not a slip. -
MinLengthPerEdit = 5— an edit must cost at least 5 characters of the longer string per edit (so 1 edit needs a 5+ char word, 2 edits need 10+), which is why"Yes"/"Yet"and"Africa"/"America"are correctly kept as different songs rather than "corrected" into each other. - Zero edits (an identical string) returns
nulltoo — that's a match, not a correction. - The Levenshtein fill bails out early once every cell in a row exceeds
max, keeping a scan over a results page cheap.
TrackSuggestionFinder.Best(candidates, wantTitle, wantArtist, artistMatches) — for each candidate (raw title/artist off the source, unnormalized), it requires one field to match exactly and the other to be within TypoEdits of it: (titleExact, artistMatches) = (true, false) anchors on title and treats the artist string as the typo candidate, and vice versa. Both exact is a match, so the candidate is skipped and Best can return null for a result set that contained the song all along; both wrong is treated as "a different song," not two simultaneous typos — that's the guard against a same-titled cover by a different artist being offered as a "correction." The artistMatches predicate is injected so a source with its own notion of an acceptable artist variant (Deezer's DeezerArtistMatcher) never has that variant mistaken for a misspelling; iTunes has no such notion, so it passes plain normalized equality. The winner is the candidate with the fewest edits across the whole result set, returned via StripAsides on both fields so a version suffix ("Creep (Acoustic)") isn't written into the correction.
All three types are covered directly by tests/KHost.Mobile.UnitTests/Clients/Matching/TrackTextNormalizerTests.cs, TrackSimilarityTests.cs and TrackSuggestionFinderTests.cs — reachable despite being internal thanks to <InternalsVisibleTo Include="KHost.Mobile.UnitTests" /> in KHost.Mobile.Clients.csproj. Both constants are pinned at their exact boundary, so changing MaxEdits or MinLengthPerEdit fails the suite rather than silently shifting what gets flagged.
This under-reports: most of a real wishlist legitimately isn't in either catalogue, and a looser rule would flag dozens of correctly-spelled songs and train users to ignore the ⚠ hint. See Lyrics & quick links and the app's Settings → spelling-suggestion level for how the host surfaces (or hides) what this algorithm finds — that level is read entirely in KHost.Mobile; the thresholds above are fixed constants in the library, not configurable per call.
Three null-safe navigation helpers over JsonElement, shared by every parser above instead of hand-checking TryGetProperty/ValueKind at each call site:
| Method | Behavior on a missing/wrong-kind property |
|---|---|
Str(name) |
null |
Bool(name) |
false |
Prop(name) |
a default (Undefined) JsonElement
|
Prop is what makes a chained read like item.Prop("artist").Str("name") degrade gracefully instead of throwing when an upstream response shape shifts.
Every network client in this library follows one rule: "no result" returns null/None and never throws; only a genuine network or HTTP failure throws the feature's domain exception. In code, that's the same filter idiom everywhere:
HttpResponseMessage response;
try
{
response = await httpClient.GetAsync(url, cancellationToken).ConfigureAwait(false);
}
catch (Exception ex) when (ex is HttpRequestException or TaskCanceledException)
{
// Check first: a caller cancel must stay an OperationCanceledException, not become a domain error.
cancellationToken.ThrowIfCancellationRequested();
throw new FooException("A message written to be shown directly in the UI.", ex);
}-
ThrowIfCancellationRequested()runs before wrapping, so a genuine caller cancellation always surfaces asOperationCanceledException, never masquerades as a domain failure. - The response is disposed on every exit path (
using var _ = response;) so the pooled connection is released even on a throw. -
ConfigureAwait(false)is used on every await in this library (it's non-UI, background code) — the one documented exception to that rule is the UI-thread JSON stores inKHost.Mobile, which is a different project. - Two clients weaken this contract further, both documented above:
DeezerSpellingSuggestionLookupnever throws at all (a hint degrading to "no suggestion"), andGitHubReleaseClientnever throws either (an update check degrading to "nothing new").
KHost.Mobile.Clients currently has no logging — no ILogger<T>, no log calls. Logging happens in Infrastructure and the app head:
-
src/KHost.Mobile.Infrastructure/Diagnostics/LoggingHttpMessageHandler.csis aDelegatingHandlerchained onto every typed client via theconfigureHandlercallbacksrc/KHost.Mobile/MauiProgram.cspasses toAddKHostClients(http => http.AddHttpMessageHandler<LoggingHttpMessageHandler>()). It logs method/URL atInformationon the way out, status/elapsed time atInformationon the way back, and (only whenDebugis enabled, and only for a textual content type — never an image download) a truncated response body atDebug(capped at 4000 chars viaMaxBodyChars, buffered up toMaxBufferBytes= 1 MiB before it's skipped). - This is the one logging seam because it captures what the native platform HTTP stack actually sent/received on-device (Android
HttpClientHandler→ OkHttp), which a desktop reproduction of the library's own logging could miss. - Providers/filters are
#if DEBUG-gated inMauiProgram.cs— Debug build routes to logcat viaAndroidLogcatLoggerProvider; Release stays quiet.
- Create the feature folder under
src/KHost.Mobile.Clients/(folder name = namespace). - Write
IFoo(interface, documents the "no result" vs. exception contract) andFooException(sealed class FooException(string message, Exception? inner = null) : Exception(message, inner)). - Write
Foo—internal sealed, primary constructor takesHttpClient httpClient(and anyI*Optionsbridge type the library needs but can't read fromIAppSettingsdirectly, mirroringILookupOptions). HTTP + status-code mapping only; delegate parsing to a static parser. - Write
FooParser—internal static, "pure — no network," manualJsonDocumenttraversal via theJson/JsonElementExtensions.cshelpers (Str/Bool/Prop), tolerant of an unexpected shape (skip, don't throw). - Register it inside
AddKHostClients(src/KHost.Mobile.Clients/Project.cs):Add(services.AddHttpClient<IFoo, Foo>(http => { /* base address, headers */ }))— base address/headers go here, inside the library; the host'sconfigureHandler(chainingLoggingHttpMessageHandler) reaches every client through theAddhelper without this file naming it. - Add unit tests under
tests/KHost.Mobile.UnitTests/for the parser (pure, no network — the bulk of coverage) and a lightweight test for the service's error-mapping (rate-limit/HTTP-error → the right exception).Foo/FooParserbeinginternalstill reaches the test project viaKHost.Mobile.Clients.csproj's<InternalsVisibleTo>. See Building & testing.
// src/KHost.Mobile.Clients/Foo/IFoo.cs
namespace KHost.Mobile.Clients.Foo;
public interface IFoo
{
Task<FooResult?> LookupAsync(string query, CancellationToken cancellationToken = default);
}
// src/KHost.Mobile.Clients/Foo/FooException.cs
public sealed class FooException(string message, Exception? innerException = null)
: Exception(message, innerException);
// src/KHost.Mobile.Clients/Foo/Foo.cs
internal sealed class Foo(HttpClient httpClient) : IFoo
{
public async Task<FooResult?> LookupAsync(string query, CancellationToken cancellationToken = default)
{
if (string.IsNullOrWhiteSpace(query))
return null;
HttpResponseMessage response;
try
{
response = await httpClient.GetAsync($"search?q={Uri.EscapeDataString(query)}", cancellationToken)
.ConfigureAwait(false);
}
catch (Exception ex) when (ex is HttpRequestException or TaskCanceledException)
{
cancellationToken.ThrowIfCancellationRequested();
throw new FooException("Couldn't reach the lookup service. Check your connection and try again.", ex);
}
using var _ = response;
if (!response.IsSuccessStatusCode)
return null; // or throw, depending on whether a non-200 here is meaningful
var json = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
return FooParser.Parse(json);
}
}
// src/KHost.Mobile.Clients/Foo/FooParser.cs
internal static class FooParser
{
public static FooResult? Parse(string json)
{
if (string.IsNullOrWhiteSpace(json)) return null;
JsonDocument doc;
try { doc = JsonDocument.Parse(json); }
catch (JsonException) { return null; }
using (doc)
{
// manual traversal via JsonElementExtensions.Str/Bool/Prop
return null;
}
}
}- Architecture — where this library sits in the app's overall layering and DI graph.
-
Metadata & album art — how
ITrackMetadataLookup/ICoverArtLookupresults are consumed and cached in the host. -
Lyrics & quick links — the
ILyricsLookupconsumer and its on-device cache. -
Import & export — the
ISpotifyImportService/IYouTubeMusicImportServiceconsumer flow. - Conventions — the house style this page's patterns are drawn from.
-
Building & testing — how to run
KHost.Mobile.UnitTestsagainst the parsers here.