• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2024 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef NET_DEVICE_BOUND_SESSIONS_SESSION_JSON_UTILS_H_
6 #define NET_DEVICE_BOUND_SESSIONS_SESSION_JSON_UTILS_H_
7 
8 #include <optional>
9 #include <vector>
10 
11 #include "net/device_bound_sessions/session_params.h"
12 
13 namespace net::device_bound_sessions {
14 
15 // Utilities for parsing the JSON session specification
16 // https://github.com/WICG/dbsc/blob/main/README.md#session-registration-instructions-json
17 
18 // Parse the full JSON as a string
19 std::optional<SessionParams> ParseSessionInstructionJson(
20     std::string_view response_json);
21 
22 }  // namespace net::device_bound_sessions
23 
24 #endif  // NET_DEVICE_BOUND_SESSIONS_SESSION_JSON_UTILS_H_
25