// SPDX-License-Identifier: AGPL-3.0-only
// Copyright (C) 2026 Vallés Puig, Ramon
//! Serde adapters for externally defined photometric types.
//!
//! The physical types remain owned by QTTY; these adapters only encode their
//! existing scalar representation for NSB consumers using Serde.
/// Serialize or deserialize QTTY surface brightness in mag/arcsec² as a JSON number.
///
/// QTTY owns `SurfaceBrightness`, so NSB cannot implement Serde's traits on
/// it directly. Annotate an application field with
/// `#[serde(with = "nsb::serde_support::surface_brightness")]` instead.
///
/// This adapter preserves the numeric wire representation; it intentionally
/// does not impose application-specific positivity, finiteness, or range rules.