Skip to content

Instantly share code, notes, and snippets.

View jim-oflaherty-jr-qalocate-com's full-sized avatar

Jim O'Flaherty jim-oflaherty-jr-qalocate-com

View GitHub Profile
@jim-oflaherty-jr-qalocate-com
jim-oflaherty-jr-qalocate-com / Augmenting what3words for E911.md
Last active June 26, 2022 20:58
Article: Augmenting what3words for E911
@jim-oflaherty-jr-qalocate-com
jim-oflaherty-jr-qalocate-com / mIpParserJsonProperties.bas
Created August 2, 2021 23:17
Full Raw Json To Properties API...
Option Explicit
Public Const JSON_PATH_ROOT_NAME_DEFAULT As String = "root"
Public Const JSON_SEPARATOR_ROW As String = vbLf 'Character: Carriage Return
Public Const JSON_SEPARATOR_KEY_VALUE As String = vbTab 'Character: TAB
Public Const JSON_SEPARATOR_ESCAPED_ROW As String = "\n"
Public Const JSON_SEPARATOR_ESCAPED_KEY_VALUE As String = "\t"
Public Const JSON_PATH_SEPARATOR_OBJECT As String = "."
Public Const JSON_PATH_SEPARATOR_ARRAY_OPEN As String = "("
Public Const JSON_PATH_SEPARATOR_ARRAY_CLOSE As String = ")"
Public Const JSON_PATH_ROOT_NAME_DEFAULT As String = "root"
Public Const JSON_SEPARATOR_ROW As String = vbLf 'Character: Carriage Return
Public Const JSON_SEPARATOR_KEY_VALUE As String = vbTab 'Character: TAB
Public Const JSON_SEPARATOR_ESCAPED_ROW As String = "\n"
Public Const JSON_SEPARATOR_ESCAPED_KEY_VALUE As String = "\t"
Public Const JSON_PATH_SEPARATOR_OBJECT As String = "."
Public Const JSON_PATH_SEPARATOR_ARRAY_OPEN As String = "("
Public Const JSON_PATH_SEPARATOR_ARRAY_CLOSE As String = ")"
Private Const ERROR_PREFIX_BASE As String = "ERROR: "
@jim-oflaherty-jr-qalocate-com
jim-oflaherty-jr-qalocate-com / JsonPropertiesFetchFromJsonPath.bas
Last active August 2, 2021 22:47
JSON Properties Fetch Value from JSON Path...
Public Const JSON_SEPARATOR_ROW As String = vbLf 'Character: Carriage Return
Public Const JSON_SEPARATOR_KEY_VALUE As String = vbTab 'Character: TAB
Public Function fetchFromJsonPath( _
ByVal jsonAsPathsToValues As String _
, ByVal jsonPath As String _
) As String
Dim result As String
Dim key As String
@jim-oflaherty-jr-qalocate-com
jim-oflaherty-jr-qalocate-com / SaaSResponseJsonAsTabSeparatedProperties.tab
Created August 2, 2021 20:21
QA Locate Geocoder SaaS Response JSON as TAB separated Properties...
root.status.code Success
root.status.interactionid 6135dce8-cfa7-11eb-8025-02e94597b2dc
root.detail.structurelocatorvalue.implicit SM0V4TGE2BP9.TVKKDGBYA5
root.detail.structurelocatorvalue.explicit SM0V4TGE2BP9[ULM].TVKKDGBYA5
root.detail.structurelocatorvalue.hasluils.gsil true
root.detail.structurelocatorvalue.hasluils.ssil true
root.detail.streetaddress.singleline USA|75039|3988|Tx|Irving||Lake Carolyn Pkwy|716|Apt|331
root.detail.streetaddress.country USA
root.detail.streetaddress.postalcode.primary 75039
root.detail.streetaddress.postalcode.secondary 3988
@jim-oflaherty-jr-qalocate-com
jim-oflaherty-jr-qalocate-com / SaaSResponse.json
Created August 2, 2021 20:16
QA Locate Geocoder SaaS Response as JSON...
{
"status" : {
"code" : "Success",
"interactionId" : "6135dce8-cfa7-11eb-8025-02e94597b2dc"
},
"detail" : {
"structureLocatorValue" : {
"implicit" : "SM0V4TGE2BP9.TVKKDGBYA5",
"explicit" : "SM0V4TGE2BP9[ULM].TVKKDGBYA5",
"hasLuils" : {
@jim-oflaherty-jr-qalocate-com
jim-oflaherty-jr-qalocate-com / ArrayVariantSize.bas
Last active July 31, 2021 15:32
Refactored version of CodeReview ArrayVariantSize function to simplify naming strategy...
Public Const SIZE_NOT_ARRAY As Long = -1
Public Const SIZE_EMPTY As Long = 0
'Return Value:
' -1 - Not an Array
' 0 - Empty
' > 0 - Defined
Public Function size( _
ByVal value As Variant _
, Optional ByVal dimensionOneBased As Long = 1 _
@jim-oflaherty-jr-qalocate-com
jim-oflaherty-jr-qalocate-com / VbaGenericArraySizeFunctionTests.bas
Last active July 24, 2021 15:59
VBA Array Size for CodeReview Question/Answers - Tests Crossing Zero Index...
Public Function f_test()
Dim blnResult As Boolean
Dim astrTemp() As String
On Error GoTo NormalExit
ReDim astrTemp(-1 To 1)
astrTemp(-1) = "A"
astrTemp(0) = "B"