@statefarmins/destringify-any-json 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +15 -16
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -5,24 +5,24 @@
5
5
 
6
6
  ## What is the destringify function?
7
7
  The problem:
8
- When AWS microservices pass an event from one service to the next; the service
9
- wraps the event in meta data and stringifies it. This is repeated each time a
10
- resource is passed. This how events that have variable levels of stringification
8
+ When AWS microservices passES an event from one service to the next; the service
9
+ wraps the event in metadata and stringifies it. This is repeated each time a
10
+ resource is passed. As a result, structures that have variable levels of stringification
11
11
  get continually passed through an distributed AWS flow.
12
12
 
13
13
  An example of a log with single and triple levels of stringification.
14
14
 
15
15
  "data":{"Records":[{"messageId":"a59c0eb1-9f86-4e37-8942","receiptHandle":"AQEB95j==","body":"{\n \"Type\" :
16
16
  \"Notification\",\n \"MessageId\" : \"fd8e5d6c-fa6a-5571-9747-3d793a1a926c\",\n \"SequenceNumber\" : \"1000000\",\n
17
- \"TopicArn\" : \"arn:aws:sns:us-east-1:6:sf-telematics-trace-test5-enrollment-topic.fifo\",\n \"Message\" : \"
18
- {\\\"event_code\\\":\\\"EE4220\\\",\\\"event_name\\\":\\\"Registration Reminder-40\\\",
19
- \\\"source\\\":\\\"EnrollmentLambda-RewriteNewFull\\\",\\\"telematics_enrollment_id\\\":\\\"91511\\\",
20
- \\\"physical_object_id\\\":\\\"15858412\\\",\\\"agre_index_id\\\":\\\"3530069169\\\",
21
- \\\"book_of_business_id\\\":\\\"ZS46WM8AL\\\",\\\"product_code\\\":\\\"20\\\",\\\"product_name\\\":\\\"DSSB\\\",
22
- \\\"enrollment_start_reason_code\\\":\\\"EN-210000\\\",\\\"enrollment_start_date\\\":\\\"2024-12-20\\\",
23
- \\\"enrollment_effective_date\\\":\\\"2025-02-07\\\",\\\"enrollment_setup_window_end_date\\\":\\\"2025-04-08\\\",
24
- \\\"enrollment_stop_date\\\":\\\"9999-12-31\\\",\\\"enrollment_complete_date\\\":\\\"2025-02-07\\\",
25
- \\\"enrollment_consent_date\\\":\\\"2025-01-30\\\",\\\"event_id\\\":\\\"6591cdaa-d0d9-4672-b6d5-2ae5393700d2\\\",
17
+ \"TopicArn\" : \"arn:aws:sns:us-east-1:6:sf-telematics-trace-topic.fifo\",\n \"Message\" : \"
18
+ {\\\"event_code\\\":\\\"EE4220\\\",\\\"event_name\\\":\\\"Reminder-40\\\",
19
+ \\\"source\\\":\\\"EnrollmentLambda-Whatever\\\",\\\"enroll_id\\\":\\\"xxxxx\\\",
20
+ \\\"obj_id\\\":\\\"xxxxxx\\\",\\\"index\\\":\\\"xxxxxxxxxx\\\",
21
+ \\\"book_id\\\":\\\"xxxxxxx\\\",\\\"product_code\\\":\\\"xx\\\",\\\"product_name\\\":\\\"XXXX\\\",
22
+ \\\"reason_code\\\":\\\"XX-999999\\\",\\\"start\\\":\\\"1700-12-20\\\",
23
+ \\\"enrollment_effective_date\\\":\\\"1700-01-99\\\",\\\"end_date\\\":\\\"1600-xx-xx\\\",
24
+ \\\"enrollment_stop_date\\\":\\\"9999-xx-xx\\\",\\\"enrollment_complete_date\\\":\\\"2025-xx-xx\\\",
25
+ \\\"enrollment_consent_date\\\":\\\"2025-xx-xx\\\",\\\"event_id\\\":\\\"6591cdaa-d0d9-4672-b6d5-2ae5393700d2\\\",
26
26
  \\\"timestamp\\\":1738260015994}\",\n \"Timestamp\" : \"2025-01-30T18:00:16.004Z\",\n \"UnsubscribeURL\" :
27
27
  \"https://sns.us-east-1.amazonaws.com/?Action=Unsubscribe&
28
28
  SubscriptionArn=arn:aws:sns:us-east-1::sf-telematics-trace-test5-enrollment-topic.fifo:c62aa\",\n
@@ -55,9 +55,8 @@
55
55
  to be stringified or destringified before being sent into the app. This applies to unit/integration/manual
56
56
  testing.
57
57
 
58
- 3. An applications that has multiple source of input that contain variable levels of strigification.
59
- Especially if the app can be subscribed to and the level of stringification that is received in
60
- future events is unknown.
58
+ 3. An application that has multiple sources of input that contain variable levels of strigification.
59
+ Especially if the app can be subscribed to and the level of stringification that will be received is unknown.
61
60
 
62
61
  ```javascript
63
62
  // Example:
@@ -70,4 +69,4 @@ const destringifiedJSON = destringify(jsonStructure);
70
69
 
71
70
  ## Contacts
72
71
  - Eric Schaumburg(Blaane15)
73
- - Matthew Walden(mwalden2004)
72
+ - Matthew Walden(mwalden2004)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statefarmins/destringify-any-json",
3
- "version": "1.0.02",
3
+ "version": "1.0.03",
4
4
  "description": "A one size fits all solution to destringification. Handles any level of stringification in JSON objects.",
5
5
  "main": "src/destringify.js",
6
6
  "type": "module",