Skip to content

Commit

Permalink
PR feedback, changelog addition, and version increment
Browse files Browse the repository at this point in the history
  • Loading branch information
dan4thewin committed Dec 8, 2020
1 parent 673cb3c commit b507350
Show file tree
Hide file tree
Showing 27 changed files with 41 additions and 37 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log for coreJSON Library

## v3.0.0 (December 2020)
- [#74](https://github.com/FreeRTOS/coreJSON/pull/74) Add `JSON_Iterate` function to iterate over items in a JSON collection.
- [#74](https://github.com/FreeRTOS/coreJSON/pull/74) Add `JSONInvalid` enum with the value 0 to `JSONTypes_t`. This change is not backwards compatible.

## v2.0.0 (November 2020)

### Updates
Expand All @@ -13,4 +17,4 @@

## v1.0.0 (September 2020)

This is the first release of the coreJSON library, a parser that strictly enforces the [ECMA-404 JSON standard](https://www.json.org/json-en.html) and is suitable for low memory footprint embedded devices.
This is the first release of the coreJSON library, a parser that strictly enforces the [ECMA-404 JSON standard](https://www.json.org/json-en.html) and is suitable for low memory footprint embedded devices.
2 changes: 1 addition & 1 deletion source/core_json.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion source/include/core_json.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/include/core_json_annex.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/include/skipGeneric.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/JSON_Iterate/JSON_Iterate_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/JSON_Search/JSON_Search_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/JSON_Validate/JSON_Validate_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/skipAnyLiteral/skipAnyLiteral_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/skipCollection/skipCollection_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/skipEscape/skipEscape_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/skipNumber/skipNumber_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/skipSpace/skipSpace_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/skipString/skipString_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/proofs/skipUTF8/skipUTF8_harness.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/stubs/skipAnyLiteral.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/stubs/skipAnyScalar.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/stubs/skipCollection.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/stubs/skipEscape.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/stubs/skipGeneric.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/stubs/skipNumber.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/stubs/skipSpace.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/stubs/skipSpaceAndComma.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/stubs/skipString.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
2 changes: 1 addition & 1 deletion test/cbmc/stubs/skipUTF8.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down
22 changes: 11 additions & 11 deletions test/unit-test/core_json_utest.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* coreJSON v2.0.0
* coreJSON v3.0.0
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
Expand Down Expand Up @@ -949,7 +949,7 @@ void test_JSON_Iterate_Legal_Array_Documents( void )
size_t start = 0, next = 0;
JSONPair_t pair = { 0 };

#define doIterate( type, answer ) \
#define iterateArray( type, answer ) \
jsonStatus = JSON_Iterate( JSON_DOC_LEGAL_ARRAY, \
JSON_DOC_LEGAL_ARRAY_LENGTH, \
&start, \
Expand All @@ -964,12 +964,12 @@ void test_JSON_Iterate_Legal_Array_Documents( void )
pair.value, \
pair.valueLength );

doIterate( ARRAY_ELEMENT_0_TYPE, ARRAY_ELEMENT_0 );
doIterate( ARRAY_ELEMENT_1_TYPE, ARRAY_ELEMENT_1 );
doIterate( ARRAY_ELEMENT_2_TYPE, ARRAY_ELEMENT_2 );
doIterate( ARRAY_ELEMENT_3_TYPE, ARRAY_ELEMENT_3 );
doIterate( ARRAY_ELEMENT_4_TYPE, ARRAY_ELEMENT_4 );
doIterate( ARRAY_ELEMENT_5_TYPE, ARRAY_ELEMENT_5 );
iterateArray( ARRAY_ELEMENT_0_TYPE, ARRAY_ELEMENT_0 );
iterateArray( ARRAY_ELEMENT_1_TYPE, ARRAY_ELEMENT_1 );
iterateArray( ARRAY_ELEMENT_2_TYPE, ARRAY_ELEMENT_2 );
iterateArray( ARRAY_ELEMENT_3_TYPE, ARRAY_ELEMENT_3 );
iterateArray( ARRAY_ELEMENT_4_TYPE, ARRAY_ELEMENT_4 );
iterateArray( ARRAY_ELEMENT_5_TYPE, ARRAY_ELEMENT_5 );

jsonStatus = JSON_Iterate( JSON_DOC_LEGAL_ARRAY,
JSON_DOC_LEGAL_ARRAY_LENGTH,
Expand All @@ -988,7 +988,7 @@ void test_JSON_Iterate_Legal_Object_Documents( void )
size_t start = 0, next = 0;
JSONPair_t pair = { 0 };

#define doIterate2( key_, type, answer ) \
#define iterateObject( key_, type, answer ) \
jsonStatus = JSON_Iterate( JSON_NESTED_OBJECT, \
JSON_NESTED_OBJECT_LENGTH, \
&start, \
Expand All @@ -1005,8 +1005,8 @@ void test_JSON_Iterate_Legal_Object_Documents( void )
pair.value, \
pair.valueLength );

doIterate2( FIRST_QUERY_KEY, ARRAY_ELEMENT_2_SUB_0_TYPE, ARRAY_ELEMENT_2_SUB_0 );
doIterate2( SECOND_QUERY_KEY, ARRAY_ELEMENT_2_SUB_1_TYPE, ARRAY_ELEMENT_2_SUB_1 );
iterateObject( FIRST_QUERY_KEY, ARRAY_ELEMENT_2_SUB_0_TYPE, ARRAY_ELEMENT_2_SUB_0 );
iterateObject( SECOND_QUERY_KEY, ARRAY_ELEMENT_2_SUB_1_TYPE, ARRAY_ELEMENT_2_SUB_1 );

jsonStatus = JSON_Iterate( JSON_NESTED_OBJECT,
JSON_NESTED_OBJECT_LENGTH,
Expand Down

0 comments on commit b507350

Please sign in to comment.