parser

package
v0.0.0-...-6a341f7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2024 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package parser provides a Go library for decoding and parsing data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser struct{}

Parser represents a parser object for decoding and parsing data.

func NewParser

func NewParser() *Parser

NewParser returns a new instance of the Parser object.

func (*Parser) DecodeCLIXML

func (p *Parser) DecodeCLIXML(xmldoc string) (string, error)

DecodeCLIXML converts a CLIXML string to a human-readable PowerShell error message.

type ParserInterface

type ParserInterface interface {
	DecodeCLIXML(clixml string) (string, error)
}

ParserInterface defines the interface for a parser, specifying methods like DecodeCLIXML.

type WinTime

type WinTime struct {
	time.Time
}

WinTime is a custom time type that embeds the time.Time type. It is designed to handle the unmarshalling of dotnet JSON datetime strings in the format "\"/Date(timestamp)/\"" when used as a field in a struct that is being unmarshalled from JSON.

func (*WinTime) UnmarshalJSON

func (t *WinTime) UnmarshalJSON(b []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for the WinTime type. It parses a JSON-encoded dotnet JSON datetime string and converts it into a WinTime object. The input byte slice is expected to represent a dotnet JSON datetime string in the format "\"/Date(timestamp)/\"".

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL