OPCFoundation / UA-.NETStandard

OPC Unified Architecture .NET Standard
Other
1.97k stars 950 forks source link

JsonDecoder: EncodeAsJson is not covered by tests #2775

Open mregen opened 1 month ago

mregen commented 1 month ago

Type of issue

Current Behavior

EncodeAsJson is a recursive function which has some suspicious code in it which might be not quite right: https://github.com/OPCFoundation/UA-.NETStandard/blob/d7680fadaa2d2e089bc2081cc4b2e96ce6a45538/Stack/Opc.Ua.Core/Types/Encoders/JsonDecoder.cs#L3022

WriteStartArray is called twice, should it be rather some sort of end function?

reported by https://github.com/OPCFoundation/UA-.NETStandard/pull/2768#discussion_r1775257528

Expected Behavior

No response

Steps To Reproduce

No response

Environment

- OS:
- Environment:
- Runtime:
- Nuget Version:
- Component:
- Server:
- Client:

Anything else?

No response