• Golang:json deserialized [] and nil operations


    I won’t say any more nonsense. Let’s just look at the code~ package main import ( “encoding/json” “log” ) type JS struct { A []string } func main() { v1 := &JS{} v2 := &JS{A: []string{}} o1, err := json.Marshal(&v1) log.Println(string(o1), err) o2, err2 := json.Marshal(&v2) log.Println(string(o2), err2) } result 2019/01/07 18:13:26 {“A”:null} <nil> 2019/01/07 […]

  • Deep analysis of ThinkPHP deserialization using chain


    Author: Ethan @ know Chuangyu 404 LaboratoryTime: September 21, 2019 If you want to know the vulnerability information at the first time, you can pay attention to our Chuangyu paper: https://paper.seebug.org/1040/ preface In July this year, ThinkPHP 5.1 X exposed a deserialization vulnerability. The deserialization vulnerability of ThinkPHP has not been analyzed before. Today, let’s […]

  • Examples of c# parsing XML and deserialization


    This time, in order to record and develop an interface based on Web service to parse the XML string transmitted by the other party. Some problems encountered in practical use. The XML format transmitted is roughly as follows: <?xml version=”1.0″ encoding=”UTF-8″?> <messages xmlns=”http://www.test.com/hit/rhin” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://www.test.com/hit/rhin file:///e:/request_message.xsd”> <heartbeat/> <switchset></switchset> <business> <datasets> <setdetails> <WS02_ 01 > content […]

  • Go language foundation JSON serialization, deserialization and file reading and writing example explanation


    catalogue summary JSON serialization Structure to JSON Map to JSON Slice to JSON JSON deserialization JSON to map JSON to structure JSON to slice Write JSON file Map write JSON file Slice write JSON file Structure to write JSON file Read JSON file Decode JSON file to map Decoding JSON files into slices Decode JSON […]

  • Discussion on knowledge points of base class or derived class when deserializing XML file as instance in C #


    Base class: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace DeserializeTest { public class SettingsBase { private string m_fileName; public string FileName { get { return m_fileName; } set { m_fileName = value; } } } } Derived class: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace DeserializeTest { public class WorldWindSettings : […]

  • Several ways of serialization and deserialization of golang


    There are many modules used by golang for serialization. Let’s introduce three. json The first one to appear is JSON, which is almost beyond doubt. serialize package main import ( “encoding/json” “fmt” ) type Girl struct { Name string Age int Gender string Where string Is_married bool } func main() { G: = girl {“satori”, […]

  • On serialization and deserialization in. Net


    Serialization and deserialization are often heard and used by all of us. However, some people may not know why. Net has such a thing and how. Net frameword can implement such a mechanism for us. Here I also briefly talk about my understanding of serialization and deserialization. 1、 What is serialization and deserialization Serialization is […]

  • Explain PHP deserialization in detail


    1. Preface Recently, I also reviewed what I learned before. I feel that I have a deeper understanding of PHP deserialization, so here is a summary 2. Serialize() function “All values in PHP can be represented by using the function serialize() to return a string containing a byte stream. Serializing an object will save all […]