simpleson icon indicating copy to clipboard operation
simpleson copied to clipboard

Lightweight C++ JSON parser & serializer that is C++98 compatible with no dependencies

Results 24 simpleson issues
Sort by recently updated
recently updated
newest added

virtual json::reader::push_result json::reader::push(char): Assertion `this->length() - start_length == 1' failed. my json is pretty simple { "kinesis": { "kinesisSchemaVersion": "1.0", "partitionKey": "filename_XXX_YYY_ZZZ_1214", "sequenceNumber": "49639895790609468939184586116865187124815123996104196162", "data": "MTVHCS9ob21lL0FubgoxNUcJdG90YWwK", "approximateArrivalTimestamp": 1681668596.11 }, "eventSource":...

Parsing functions should return the following - The parsed object if valid - A flag identifying if the parse was valid - The index where parsing left off If the...

Certain data types (`null` and `boolean`) have a fixed size and others (numbers) generally have a predictable size. Use `reserve` to prepare the string buffer in order to improve performance.

1. Create an abstract class `json::jconvertible` that handles serialization and deserialization 2. Create a macro to assign class members for serialization and deserialization

Msvc does not support `#if` directives that do not wrap entire statements [Example](https://godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(filename:'1',fontScale:14,fontUsePx:'0',j:1,lang:c%2B%2B,selection:(endColumn:14,endLineNumber:2,positionColumn:14,positionLineNumber:2,selectionStartColumn:14,selectionStartLineNumber:2,startColumn:14,startLineNumber:2),source:'%23include++%3Ccassert%3E%0A%23define+FOO+1%0A%0A//+Type+your+code+here,+or+load+an+example.%0Aint+square(int+num)+%7B%0A++++return+num+*+num%3B%0A%7D%0A%0Aint+main()+%7B%0A++++%23if+FOO%0A++++assert(%0A++++%23endif%0A++++square(2)%0A++++%23if+FOO%0A++++%3D%3D+4)%3B%0A++++%23else%0A++++%3B%0A++++%23endif%0A%0A%0A%7D'),l:'5',n:'1',o:'C%2B%2B+source+%231',t:'0')),k:33.333333333333336,l:'4',n:'0',o:'',s:0,t:'0'),(g:!((h:compiler,i:(compiler:vcpp_v19_latest_x86,filters:(b:'0',binary:'1',binaryObject:'1',commentOnly:'0',debugCalls:'1',demangle:'0',directives:'0',execute:'1',intel:'0',libraryCode:'0',trim:'1',verboseDemangling:'0'),flagsViewOpen:'1',fontScale:14,fontUsePx:'0',j:1,lang:c%2B%2B,libs:!(),options:'',overrides:!(),selection:(endColumn:1,endLineNumber:1,positionColumn:1,positionLineNumber:1,selectionStartColumn:1,selectionStartLineNumber:1,startColumn:1,startLineNumber:1),source:1),l:'5',n:'0',o:'+x86+msvc+v19.latest+(Editor+%231)',t:'0')),k:22.153209109730845,l:'4',n:'0',o:'',s:0,t:'0'),(g:!((h:output,i:(compilerName:'x86+msvc+v19.latest',editorid:1,fontScale:14,fontUsePx:'0',j:1,wrap:'1'),l:'5',n:'0',o:'Output+of+x86+msvc+v19.latest+(Compiler+%231)',t:'0')),k:44.51345755693581,l:'4',n:'0',o:'',s:0,t:'0')),l:'2',n:'0',o:'',t:'0')),version:4) This is a simple fix to cpp.json.

This library appears to escape forward slashes, which is fine, but it does not unescape them when parsing. This causes an error where the library sees the backslash escape, but...

This adds fuzzing by way of [ClusterFuzzLite](https://google.github.io/clusterfuzzlite/), which is a GitHub action that will perform a short amount of fuzzing for new PRs. The goal is to use fuzzing to...

The code: ```cpp while(!EMPTY_STRING(input) && stream.push(*index) != json::reader::REJECTED) { index++; } ``` Runs into an issue because `EMPTY_STRING(input)` is used to check for null-pointer ending, but `input` is never incremented...

The changes in my fork address the escape slash preceding a forward slash and the lack of long-long support