This commit is contained in:
Sanchime 2022-06-26 09:36:21 +08:00
parent b49e695a6c
commit 268d1bfb6c
39 changed files with 420 additions and 2 deletions

3
.gitgnore Normal file
View File

@ -0,0 +1,3 @@
# 编译时生成的文件
bin/
obj/

View File

@ -1,4 +1,5 @@
open Sanchime.Json.Parser
open Sanchime.Json
open Sanchime.Json.Parser
let json = """
{
@ -19,6 +20,10 @@ let json = """
}
"""
let foo = function
| Object v -> v
| _ -> failwith ""
let user = json |> parse
user |> printfn "%A"
user |> foo |> List.iter (fun a -> printfn $"Name: {fst a}, Value: {snd a}")

BIN
bin/Debug/net6.0/FSharp.Core.dll Executable file

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,82 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v6.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v6.0": {
"Sanchime.Json.Parser/1.0.0": {
"dependencies": {
"FSharp.Core": "6.0.5"
},
"runtime": {
"Sanchime.Json.Parser.dll": {}
}
},
"FSharp.Core/6.0.5": {
"runtime": {
"lib/netstandard2.1/FSharp.Core.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.522.27404"
}
},
"resources": {
"lib/netstandard2.1/cs/FSharp.Core.resources.dll": {
"locale": "cs"
},
"lib/netstandard2.1/de/FSharp.Core.resources.dll": {
"locale": "de"
},
"lib/netstandard2.1/es/FSharp.Core.resources.dll": {
"locale": "es"
},
"lib/netstandard2.1/fr/FSharp.Core.resources.dll": {
"locale": "fr"
},
"lib/netstandard2.1/it/FSharp.Core.resources.dll": {
"locale": "it"
},
"lib/netstandard2.1/ja/FSharp.Core.resources.dll": {
"locale": "ja"
},
"lib/netstandard2.1/ko/FSharp.Core.resources.dll": {
"locale": "ko"
},
"lib/netstandard2.1/pl/FSharp.Core.resources.dll": {
"locale": "pl"
},
"lib/netstandard2.1/pt-BR/FSharp.Core.resources.dll": {
"locale": "pt-BR"
},
"lib/netstandard2.1/ru/FSharp.Core.resources.dll": {
"locale": "ru"
},
"lib/netstandard2.1/tr/FSharp.Core.resources.dll": {
"locale": "tr"
},
"lib/netstandard2.1/zh-Hans/FSharp.Core.resources.dll": {
"locale": "zh-Hans"
},
"lib/netstandard2.1/zh-Hant/FSharp.Core.resources.dll": {
"locale": "zh-Hant"
}
}
}
}
},
"libraries": {
"Sanchime.Json.Parser/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"FSharp.Core/6.0.5": {
"type": "package",
"serviceable": true,
"sha512": "sha512-FwdQVtpj34xt8vKyFUUeNIS+obWlEnSrSW7y1ivRVts/ZsrUsKyOd0bZehgFhWdnB/NBsa9DCWvNFMTO0XDFcg==",
"path": "fsharp.core/6.0.5",
"hashPath": "fsharp.core.6.0.5.nupkg.sha512"
}
}
}

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,9 @@
{
"runtimeOptions": {
"tfm": "net6.0",
"framework": {
"name": "Microsoft.NETCore.App",
"version": "6.0.0"
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,3 @@
namespace Microsoft.BuildSettings
[<System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName="")>]
do ()

View File

@ -0,0 +1,17 @@
// <auto-generated>
// Generated by the FSharp WriteCodeFragment class.
// </auto-generated>
namespace FSharp
open System
open System.Reflection
[<assembly: System.Reflection.AssemblyCompanyAttribute("Sanchime.Json.Parser")>]
[<assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")>]
[<assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")>]
[<assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")>]
[<assembly: System.Reflection.AssemblyProductAttribute("Sanchime.Json.Parser")>]
[<assembly: System.Reflection.AssemblyTitleAttribute("Sanchime.Json.Parser")>]
[<assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")>]
do()

View File

@ -0,0 +1 @@
5c9f0b2e1129cf2804bdf2a3753de0a775bcd346

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1 @@
df6284d73f45b5ac986a68aa7ce6249f6a111fd6

View File

@ -0,0 +1,26 @@
/home/sanchime/Desktop/Sanchime.Json/bin/Debug/net6.0/Sanchime.Json.Parser
/home/sanchime/Desktop/Sanchime.Json/bin/Debug/net6.0/Sanchime.Json.Parser.deps.json
/home/sanchime/Desktop/Sanchime.Json/bin/Debug/net6.0/Sanchime.Json.Parser.runtimeconfig.json
/home/sanchime/Desktop/Sanchime.Json/bin/Debug/net6.0/Sanchime.Json.Parser.dll
/home/sanchime/Desktop/Sanchime.Json/bin/Debug/net6.0/Sanchime.Json.Parser.pdb
/home/sanchime/Desktop/Sanchime.Json/bin/Debug/net6.0/FSharp.Core.dll
/home/sanchime/Desktop/Sanchime.Json/bin/Debug/net6.0/cs/FSharp.Core.resources.dll
/home/sanchime/Desktop/Sanchime.Json/bin/Debug/net6.0/de/FSharp.Core.resources.dll
/home/sanchime/Desktop/Sanchime.Json/bin/Debug/net6.0/es/FSharp.Core.resources.dll
/home/sanchime/Desktop/Sanchime.Json/bin/Debug/net6.0/fr/FSharp.Core.resources.dll
/home/sanchime/Desktop/Sanchime.Json/bin/Debug/net6.0/it/FSharp.Core.resources.dll
/home/sanchime/Desktop/Sanchime.Json/bin/Debug/net6.0/ja/FSharp.Core.resources.dll
/home/sanchime/Desktop/Sanchime.Json/bin/Debug/net6.0/ko/FSharp.Core.resources.dll
/home/sanchime/Desktop/Sanchime.Json/bin/Debug/net6.0/pl/FSharp.Core.resources.dll
/home/sanchime/Desktop/Sanchime.Json/bin/Debug/net6.0/pt-BR/FSharp.Core.resources.dll
/home/sanchime/Desktop/Sanchime.Json/bin/Debug/net6.0/ru/FSharp.Core.resources.dll
/home/sanchime/Desktop/Sanchime.Json/bin/Debug/net6.0/tr/FSharp.Core.resources.dll
/home/sanchime/Desktop/Sanchime.Json/bin/Debug/net6.0/zh-Hans/FSharp.Core.resources.dll
/home/sanchime/Desktop/Sanchime.Json/bin/Debug/net6.0/zh-Hant/FSharp.Core.resources.dll
/home/sanchime/Desktop/Sanchime.Json/obj/Debug/net6.0/Sanchime.Json.Parser.fsproj.AssemblyReference.cache
/home/sanchime/Desktop/Sanchime.Json/obj/Debug/net6.0/Sanchime.Json.Parser.AssemblyInfoInputs.cache
/home/sanchime/Desktop/Sanchime.Json/obj/Debug/net6.0/Sanchime.Json.Parser.AssemblyInfo.fs
/home/sanchime/Desktop/Sanchime.Json/obj/Debug/net6.0/Sanchime.Json.Parser.fsproj.CopyComplete
/home/sanchime/Desktop/Sanchime.Json/obj/Debug/net6.0/Sanchime.Json.Parser.dll
/home/sanchime/Desktop/Sanchime.Json/obj/Debug/net6.0/Sanchime.Json.Parser.pdb
/home/sanchime/Desktop/Sanchime.Json/obj/Debug/net6.0/Sanchime.Json.Parser.genruntimeconfig.cache

View File

@ -0,0 +1 @@
31cf1bc70a74fc2d891c1c6dbdc6f8c16172e8c5

Binary file not shown.

BIN
obj/Debug/net6.0/apphost Executable file

Binary file not shown.

View File

@ -0,0 +1,64 @@
{
"format": 1,
"restore": {
"/home/sanchime/Desktop/Sanchime.Json/Sanchime.Json.Parser.fsproj": {}
},
"projects": {
"/home/sanchime/Desktop/Sanchime.Json/Sanchime.Json.Parser.fsproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/home/sanchime/Desktop/Sanchime.Json/Sanchime.Json.Parser.fsproj",
"projectName": "Sanchime.Json.Parser",
"projectPath": "/home/sanchime/Desktop/Sanchime.Json/Sanchime.Json.Parser.fsproj",
"packagesPath": "/home/sanchime/.nuget/packages/",
"outputPath": "/home/sanchime/Desktop/Sanchime.Json/obj/",
"projectStyle": "PackageReference",
"configFilePaths": [
"/home/sanchime/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"net6.0"
],
"sources": {
"/usr/share/dotnet/sdk/6.0.301/FSharp/library-packs": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"projectReferences": {}
}
}
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"dependencies": {
"FSharp.Core": {
"include": "Runtime, Compile, Build, Native, Analyzers, BuildTransitive",
"target": "Package",
"version": "[6.0.5, )",
"generatePathProperty": true
}
},
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/6.0.301/RuntimeIdentifierGraph.json"
}
}
}
}
}

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/home/sanchime/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/home/sanchime/.nuget/packages/</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.2.1</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="/home/sanchime/.nuget/packages/" />
</ItemGroup>
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<PkgFSharp_Core Condition=" '$(PkgFSharp_Core)' == '' ">/home/sanchime/.nuget/packages/fsharp.core/6.0.5</PkgFSharp_Core>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />

2
obj/fsac.cache Normal file

File diff suppressed because one or more lines are too long

174
obj/project.assets.json Normal file
View File

@ -0,0 +1,174 @@
{
"version": 3,
"targets": {
"net6.0": {
"FSharp.Core/6.0.5": {
"type": "package",
"compile": {
"lib/netstandard2.1/FSharp.Core.dll": {}
},
"runtime": {
"lib/netstandard2.1/FSharp.Core.dll": {}
},
"resource": {
"lib/netstandard2.1/cs/FSharp.Core.resources.dll": {
"locale": "cs"
},
"lib/netstandard2.1/de/FSharp.Core.resources.dll": {
"locale": "de"
},
"lib/netstandard2.1/es/FSharp.Core.resources.dll": {
"locale": "es"
},
"lib/netstandard2.1/fr/FSharp.Core.resources.dll": {
"locale": "fr"
},
"lib/netstandard2.1/it/FSharp.Core.resources.dll": {
"locale": "it"
},
"lib/netstandard2.1/ja/FSharp.Core.resources.dll": {
"locale": "ja"
},
"lib/netstandard2.1/ko/FSharp.Core.resources.dll": {
"locale": "ko"
},
"lib/netstandard2.1/pl/FSharp.Core.resources.dll": {
"locale": "pl"
},
"lib/netstandard2.1/pt-BR/FSharp.Core.resources.dll": {
"locale": "pt-BR"
},
"lib/netstandard2.1/ru/FSharp.Core.resources.dll": {
"locale": "ru"
},
"lib/netstandard2.1/tr/FSharp.Core.resources.dll": {
"locale": "tr"
},
"lib/netstandard2.1/zh-Hans/FSharp.Core.resources.dll": {
"locale": "zh-Hans"
},
"lib/netstandard2.1/zh-Hant/FSharp.Core.resources.dll": {
"locale": "zh-Hant"
}
},
"contentFiles": {
"contentFiles/any/any/_._": {
"buildAction": "None",
"codeLanguage": "any",
"copyToOutput": false
}
}
}
}
},
"libraries": {
"FSharp.Core/6.0.5": {
"sha512": "FwdQVtpj34xt8vKyFUUeNIS+obWlEnSrSW7y1ivRVts/ZsrUsKyOd0bZehgFhWdnB/NBsa9DCWvNFMTO0XDFcg==",
"type": "package",
"path": "fsharp.core/6.0.5",
"files": [
".nupkg.metadata",
".signature.p7s",
"Icon.png",
"contentFiles/any/netstandard2.0/FSharp.Core.xml",
"contentFiles/any/netstandard2.1/FSharp.Core.xml",
"fsharp.core.6.0.5.nupkg.sha512",
"fsharp.core.nuspec",
"lib/netstandard2.0/FSharp.Core.dll",
"lib/netstandard2.0/FSharp.Core.xml",
"lib/netstandard2.0/cs/FSharp.Core.resources.dll",
"lib/netstandard2.0/de/FSharp.Core.resources.dll",
"lib/netstandard2.0/es/FSharp.Core.resources.dll",
"lib/netstandard2.0/fr/FSharp.Core.resources.dll",
"lib/netstandard2.0/it/FSharp.Core.resources.dll",
"lib/netstandard2.0/ja/FSharp.Core.resources.dll",
"lib/netstandard2.0/ko/FSharp.Core.resources.dll",
"lib/netstandard2.0/pl/FSharp.Core.resources.dll",
"lib/netstandard2.0/pt-BR/FSharp.Core.resources.dll",
"lib/netstandard2.0/ru/FSharp.Core.resources.dll",
"lib/netstandard2.0/tr/FSharp.Core.resources.dll",
"lib/netstandard2.0/zh-Hans/FSharp.Core.resources.dll",
"lib/netstandard2.0/zh-Hant/FSharp.Core.resources.dll",
"lib/netstandard2.1/FSharp.Core.dll",
"lib/netstandard2.1/FSharp.Core.xml",
"lib/netstandard2.1/cs/FSharp.Core.resources.dll",
"lib/netstandard2.1/de/FSharp.Core.resources.dll",
"lib/netstandard2.1/es/FSharp.Core.resources.dll",
"lib/netstandard2.1/fr/FSharp.Core.resources.dll",
"lib/netstandard2.1/it/FSharp.Core.resources.dll",
"lib/netstandard2.1/ja/FSharp.Core.resources.dll",
"lib/netstandard2.1/ko/FSharp.Core.resources.dll",
"lib/netstandard2.1/pl/FSharp.Core.resources.dll",
"lib/netstandard2.1/pt-BR/FSharp.Core.resources.dll",
"lib/netstandard2.1/ru/FSharp.Core.resources.dll",
"lib/netstandard2.1/tr/FSharp.Core.resources.dll",
"lib/netstandard2.1/zh-Hans/FSharp.Core.resources.dll",
"lib/netstandard2.1/zh-Hant/FSharp.Core.resources.dll"
]
}
},
"projectFileDependencyGroups": {
"net6.0": [
"FSharp.Core >= 6.0.5"
]
},
"packageFolders": {
"/home/sanchime/.nuget/packages/": {}
},
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/home/sanchime/Desktop/Sanchime.Json/Sanchime.Json.Parser.fsproj",
"projectName": "Sanchime.Json.Parser",
"projectPath": "/home/sanchime/Desktop/Sanchime.Json/Sanchime.Json.Parser.fsproj",
"packagesPath": "/home/sanchime/.nuget/packages/",
"outputPath": "/home/sanchime/Desktop/Sanchime.Json/obj/",
"projectStyle": "PackageReference",
"configFilePaths": [
"/home/sanchime/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"net6.0"
],
"sources": {
"/usr/share/dotnet/sdk/6.0.301/FSharp/library-packs": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"projectReferences": {}
}
}
},
"frameworks": {
"net6.0": {
"targetAlias": "net6.0",
"dependencies": {
"FSharp.Core": {
"include": "Runtime, Compile, Build, Native, Analyzers, BuildTransitive",
"target": "Package",
"version": "[6.0.5, )",
"generatePathProperty": true
}
},
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/usr/share/dotnet/sdk/6.0.301/RuntimeIdentifierGraph.json"
}
}
}
}

10
obj/project.nuget.cache Normal file
View File

@ -0,0 +1,10 @@
{
"version": 2,
"dgSpecHash": "Fby9SumVPbLHvjItsxFIdx6hYh09MRlIcJMwAuQRdLTFadSSLCu2pYjKgoMSXtf0xcHVtrB+nQXSgsXpcwPxdQ==",
"success": true,
"projectFilePath": "/home/sanchime/Desktop/Sanchime.Json/Sanchime.Json.Parser.fsproj",
"expectedPackageFiles": [
"/home/sanchime/.nuget/packages/fsharp.core/6.0.5/fsharp.core.6.0.5.nupkg.sha512"
],
"logs": []
}