Comments (2)
Hi @Arrouusmith I cannot reproduce this error
Can you double check with:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="JmesPath.Net" Version="1.0.308" />
</ItemGroup>
</Project>
using DevLab.JmesPath;
if (args.Length == 0)
{
Console.Error.WriteLine("Missing required JMESPath expression.");
Environment.Exit(42);
}
var expression = args[0];
var stdin = Console.In;
var stdout = Console.Out;
var text = stdin.ReadToEnd();
var jp = new JmesPath();
var token = jp.Transform(text, expression);
stdout.WriteLine(token);
And the following commands:
Set-Content -Path file.json -Value '[{"Id":"ab9d98d3-f163-44b4-bb6a-739a82139208","SupportCode":"031eb155-cc36-460a-ad6b-164f9b4fd0f8","TicketNumber":1}]'
cat file.json | dotnet run -- "[?TicketNumber==``1``].SupportCode | [0]"
from jmespath.net.
Hi, yes, you are quite right. I have gone back through my system and found that I have been corrupting the format of the string immediately before running the expression over it. My bad and thank you for your time.
from jmespath.net.
Related Issues (20)
- Filtering on number properties needs to be escaped with back-ticks HOT 1
- ERROR : Error(4, 76): syntax, near '$'. in C# when i Parse the expression HOT 9
- Consider renaming the project to `JMESPath.NET` with proper casing.
- Consider exposing the AST parse output. HOT 1
- Consider implementing a dependency injection mechanism to simplify code.
- System.Text.Json support HOT 11
- Convert Expression to JMESPath string HOT 5
- netstandard1.3 HOT 3
- Bug in .NET with a number comparison HOT 3
- Array parsing does not work as expected HOT 2
- JMESPath.Net does not handle Unicode surrogate pair characters correctly.
- Behaviour issue when using `null` on the lhs of a `pipe-expression`
- Add extension point to register custom function implementation HOT 4
- lower() function uses ToLowerInvariant incorrectly
- String Slice fails with 'Index was outside the bounds of the array.' error HOT 3
- Hash is calculated each time even for comparison with Null token
- JmesPath class might not be thread-safe HOT 3
- Trim() function (and trim_left/trim_right) has state that affects next invocations
- Add async support for custom functions HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jmespath.net.