blob: bd26884e827be5210ba1b5887c4f3d201bb84327 [file] [log] [blame]
Aatir186ce8c2019-10-20 15:13:39 -05001#pragma once
2
3#include <ctype.h>
4#include <stdio.h>
5
6#include <fstream>
7#include <iomanip>
8#include <iostream>
9#include <string>
10#include <vector>
11
12namespace openpower
13{
14namespace pels
15{
16
17/**
18 * @brief escape json - use it for PEL hex dumps.
19 * @param[in] std::string - the unescaped JSON as a string literal
20 * @return std::string - escaped JSON string literal
21 */
22std::string escapeJSON(const std::string& input);
23
24/**
25 * @brief get hex dump for PEL section in json format.
26 * @param[in] const void* - Raw PEL data
27 * @param[i] size_t - size of Raw PEL
28 * @return char * - the Hex dump
29 */
30char* dumpHex(const void* data, size_t size);
31
32} // namespace pels
33} // namespace openpower