diff --git a/CMakeLists.txt b/CMakeLists.txt index e9073ba..246282e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,10 +14,10 @@ cmake_minimum_required(VERSION 3.27) # This is the current version of this C++ project -project(c2pa-c VERSION 0.23.9) +project(c2pa-c VERSION 0.23.10) # Set the version of the c2pa_rs library used -set(C2PA_VERSION "0.83.0") +set(C2PA_VERSION "0.84.1") set(CMAKE_POLICY_DEFAULT_CMP0135 NEW) set(CMAKE_C_STANDARD 17) diff --git a/include/c2pa.hpp b/include/c2pa.hpp index 0a0d5a5..5375544 100644 --- a/include/c2pa.hpp +++ b/include/c2pa.hpp @@ -923,6 +923,18 @@ namespace c2pa /// @throws C2paException for errors encountered by the C2PA library. std::string json() const; + /// @brief Get the manifest as a detailed JSON string. + /// @details The detailed view more closely resembles the underlying JUMBF + /// manifest store. Unlike json(), it exposes the full + /// `assertion_store` map for each manifest, including assertions + /// that the regular view filters out (such as `c2pa.thumbnail.*`, + /// `c2pa.actions.*`, and `c2pa.hash.*`). Use this when building + /// redaction URIs or otherwise needing the canonical assertion + /// labels embedded in the manifest. + /// @return The detailed manifest as a JSON string. + /// @throws C2paException for errors encountered by the C2PA library. + std::string detailed_json() const; + /// @brief Get a resource from the reader and write it to a file. /// @param uri The URI of the resource. /// @param path The file path to write the resource to. diff --git a/src/c2pa_reader.cpp b/src/c2pa_reader.cpp index b0d1740..b47210d 100644 --- a/src/c2pa_reader.cpp +++ b/src/c2pa_reader.cpp @@ -162,6 +162,11 @@ namespace c2pa return detail::c_string_to_string(c2pa_reader_json(c2pa_reader)); } + std::string Reader::detailed_json() const + { + return detail::c_string_to_string(c2pa_reader_detailed_json(c2pa_reader)); + } + [[nodiscard]] std::optional Reader::remote_url() const { auto url = c2pa_reader_remote_url(c2pa_reader); if (url == nullptr) { return std::nullopt; } diff --git a/tests/builder.test.cpp b/tests/builder.test.cpp index 11d7cdd..de74d8b 100644 --- a/tests/builder.test.cpp +++ b/tests/builder.test.cpp @@ -5980,7 +5980,7 @@ TEST_F(BuilderTest, CreateIntentViaContext) auto context = c2pa::Context(R"({ "version": 1, "builder": { - "intent": {"Create": "digitalCapture"} + "intent": {"create": "digitalCapture"} } })"); auto builder = c2pa::Builder(context, R"({})");